API Documentation

Your Guide to Seamless Integration

Last updated: 13 March 2024Introduction

Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

The HitMe API differs for every account as we release new versions and tailor functionality. These docs are customized to your version of the API and display your access key and exemple data, which only you can see.


Authentication

The HitMe API uses API keys to authenticate requests.

Your API keys are unique, be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

Limitations

Maximum numbers of requests is limited to 5000 / hour, it's mean your key can be suspended for 24h if will be overused.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Public User Key:
Secret Key:

This is an example API key. The request will not work with this key. Please create an account to access live API keys.

Required attributes:
user_key (string)

All request to API require user access key.

secret_key (string)

For security reasons, the secret key should not be shown/shared publicly.


Errors

HitMe uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success.

Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted etc.).

Codes in the 5xx range indicate an error with HitMe's servers (these are rare).


Attributes:
code (string)

For some errors that could be handled programmatically, a short string indicating the error code reported.

message (string)

A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.

200 - OK

Everything worked as expected.

429 - Too Many Requests

Too many requests hit the API too quickly. We recommend an exponential backoff of your requests.

400 - Bad Request

The request was unacceptable, often due to missing a required parameter.

401 - Unauthorized

No valid API key provided.

404 - Not Found

The requested resource doesn't exist.

Resources


GETSingle Post

This action allow to request data of specific post. Returned data will include simple post data with connected to it image file.


Required attributes:
method (string)

get

action (string)

post

postid (integer)

Unique post ID

Example response:
{
"id""1",
"status""publish",
"title""Example post",
"content""<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. <strong>Nulla velit nunc</strong>, porta sed risus in, tempus posuere nibh. Aenean semper fringilla lacus ac bibendum. Praesent egestas accumsan finibus.</p>",
"image"{
"id""1",
"file_small""https://cdn.hitme.ie/app/assets/images/main/no-image.jpg",
"file_large""https://cdn.hitme.ie/app/assets/images/main/no-image-big.jpg",
"file_type""image"
},
"created""1711366799",
"slug""example-post",
"type""post"
}

GETSingle Product

This action allow to request data of specific product. Returned data will include simple product data with connected to it main image file.


Required attributes:
method (string)

get

action (string)

product

postid (integer)

Unique product ID

Example response:
{
"id""1",
"status""publish",
"title""Example product",
"short""Praesent egestas accumsan finibus. Nunc in enim ante. Nunc tortor tortor, suscipit ut eros eget, elementum sodales libero.",
"content""<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. <strong>Nulla velit nunc</strong>, porta sed risus in, tempus posuere nibh. Aenean semper fringilla lacus ac bibendum. Praesent egestas accumsan finibus.</p>",
"created""1711366799",
"type""simple",
"slug""example-product",
"images"{
"id""1",
"file_small""https://cdn.hitme.ie/app/assets/images/main/no-image.jpg",
"file_large""https://cdn.hitme.ie/app/assets/images/main/no-image-big.jpg",
"file_type""image"
},
"prices"{
"regular_price"100.1,
"sale_price"null,
"stock""in-stock",
"pcs"""
}
}

GETFiles

This is an object representing a file hosted on HitMe servers. To get right file you need to use unique id which is connected with to the file.

All files are hosted on HitMe CDN server.


Required attributes:
method (string)

get

action (string)

file

postid (integer)

Unique file ID

Example response:
{
"id""1",
"name""https://cdn.hitme.ie/app/assets/images/main/no-image-big.jpg",
"size"62,
"type""image"
}
This site uses cookies to enhance your experience and show personalized ads. By using our site, you confirm that you have read and agree to our Cookie Policy, Privacy Policy, and Terms of Service.
Got it