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"12,
"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"455006,
"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"
},
"publication"1720521000,
"slug""example-post-lorem-ipsum-5",
"type""post",
"category"[
{
"id"7,
"name""Category level 1",
"slug""category-level-1",
"parent"0
},
{
"id"31,
"name""Category next level",
"slug""category-next-level",
"parent"7
}
]
}

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 - simple product:
{
"id"1,
"status""publish",
"title""Example simple product",
"short""Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean semper fringilla lacus ac bibendum. Praesent egestas accumsan finibus",
"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>",
"publication"1720521000,
"type""simple",
"slug""example-post-lorem-ipsum-2",
"category"[
{
"id"3,
"name""Main category",
"slug""main-category",
"parent"0
},
{
"id"4,
"name""Example subcategory",
"slug""example-subcategory",
"parent"3
}
],
"images"[
{
"id"454912,
"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"{
"sku"null,
"regular_price"13002,
"sale_price"null,
"stock""in-stock",
"pcs"null
}
}
Example response - variable product:
{
"id"4,
"status""publish",
"title""Example product - Lorem ipsum",
"short""Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean semper fringilla lacus ac bibendum. Praesent egestas accumsan finibus",
"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>",
"publication"1720522320,
"type""variable",
"slug""example-post-lorem-ipsum-8",
"category"[
{
"id"2,
"name""Example category",
"slug""example-category",
"parent"0
},
{
"id"6,
"name""Example subcategory",
"slug""example-subcategory",
"parent"2
},
{
"id"11,
"name""Example product category",
"slug""example-product-category",
"parent"6
}
],
"images"[
{
"id"453135,
"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"
},
{
"id"454543,
"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"
},
{
"id"454552,
"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"
},
{
"id"453139,
"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"
},
{
"id"454603,
"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"[
{
"attributes"[
{
"id"3,
"name""red",
"parent"{
"id"1,
"name""Color"
}
},
{
"id"55,
"name""summer",
"parent"{
"id"54,
"name""Season"
}
}
],
"sku"null,
"image"{
"id"453136,
"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"
},
"regular_price"9000,
"sale_price"null,
"stock""in-stock",
"pcs"null
},
{
"attributes"[
{
"id"5,
"name""orange",
"parent"{
"id"1,
"name""Color"
}
},
{
"id"55,
"name""Summer",
"parent"{
"id"54,
"name""season"
}
}
],
"sku"null,
"image"{
"id"453133,
"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"
},
"regular_price"10000,
"sale_price"null,
"stock""in-stock",
"pcs"null
},
{
"attributes"[
{
"id"5,
"name""orange",
"parent"{
"id"1,
"name""Color"
}
},
{
"id"56,
"name""winter",
"parent"{
"id"54,
"name""Season"
}
}
],
"sku"null,
"image"null,
"regular_price"10000,
"sale_price"null,
"stock""in-stock",
"pcs"null
}
]
}
Example response - file virtual product:
{
"id"26,
"status""publish",
"title""Example product - Lorem ipsum",
"short""Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean semper fringilla lacus ac bibendum. Praesent egestas accumsan finibus",
"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>",
"publication"1729105500,
"type""virtual",
"slug""example-file-product",
"category"[
{
"id"2,
"name""Example category",
"slug""example-category",
"parent"0
},
{
"id"6,
"name""Example subcategory",
"slug""example-subcategory",
"parent"2
}
],
"images"[
{
"id"455360,
"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"{
"type""file",
"regular_price"1000,
"sale"null,
"stock""in-stock",
"fileID"455364
}
}
Example response - link virtual product:
{
"id"27,
"status""publish",
"title""Example product - Lorem ipsum",
"short""Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean semper fringilla lacus ac bibendum. Praesent egestas accumsan finibus",
"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>",
"publication"1729105500,
"type""virtual",
"slug""example-link-product",
"category"[
{
"id"2,
"name""Example category",
"slug""example-category",
"parent"0
},
{
"id"6,
"name""Example subcategory",
"slug""example-subcategory",
"parent"2
}
],
"images"[
{
"id"455359,
"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"{
"type""link",
"regular_price"1100,
"sale"null,
"stock""in-stock",
"link""https://cdn.hitme.ie/file-download.zip"
}
}
Example response - video virtual product:
{
"title""Example product - Lorem ipsum",
"short""Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean semper fringilla lacus ac bibendum. Praesent egestas accumsan finibus",
"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>",
"publication"1729105500,
"type""virtual",
"slug""example-link-product",
"category"[
{
"id"2,
"name""Example category",
"slug""example-category",
"parent"0
},
{
"id"6,
"name""Example subcategory",
"slug""example-subcategory",
"parent"2
}
],
"images"[
{
"id"455359,
"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"{
"type""video",
"regular_price"11100,
"sale"null,
"stock""in-stock",
"videos"[
{
"linkURL""https://www.youtube.com/watch?v=",
"accessURL""free-access"
},
{
"linkURL""https://www.youtube.com/watch?v=",
"accessURL""paid-access"
},
{
"linkURL""https://www.youtube.com/watch?v=",
"accessURL""paid-access"
}
]
}
}

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"
}