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 10000 / 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
}
]
}
Response Breakdown
  • id: The unique ID of the blog post.
  • status: The publication status of the post (e.g., publish).
  • title: The title of the post.
  • content: The HTML content of the post, including text and embedded elements.
  • image: The image linked to the post (show more)
    • file_small: The URL to a small-sized image.
    • file_large: The URL to a larger-sized image.
    • file_type: The type of file (e.g., image).
  • publication: The Unix timestamp of when the post was published.
  • slug: The SEO-friendly URL slug for the post.
  • type: The type of content (e.g., post).
  • category: The category linked to the post (show more)
    • id: The unique ID of the category.
    • name: The name of the category.
    • slug: The URL slug of the category.
    • parent: The ID of the parent category (if applicable).

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
}
}
Response Breakdown
  • id: The unique ID of the product.
  • status: The publication status of the product (e.g., publish).
  • title: The title of the product.
  • short: A short description or summary of the product.
  • content: The detailed description of the product, often in HTML format.
  • publication: The Unix timestamp when the product was published.
  • slug: The SEO-friendly URL of the product.
  • type: The type of the product (e.g., simple, variable, virtual).
  • images: The images linked to the product (show more)
    • file_small: The URL to the small version of the image.
    • file_large: The URL to the large version of the image.
    • file_type: The type of the file (usually "image").
  • category: The categories linked to the product (show more)
    • id: The unique ID of the category.
    • name: The name of the category.
    • slug: The URL-friendly version of the category name.
    • parent: The ID of the parent category (if applicable).

Pricing information for the product, which varies based on the product type

  • prices: single price list available
    • sku: Stock unique unit for this product (can be null for some products).
    • regular_price: The regular price of the product.
    • sale_price: The sale price (if any, otherwise null).
    • stock: The stock status (e.g., in-stock, out-of-stock).
    • pcs: Quantity available, which may be null for non-quantifiable products.
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"[
{
"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"3,
"name""red",
"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"55,
"name""Summer",
"parent"{
"id"54,
"name""season"
}
}
]
},
{
"sku"null,
"image"null,
"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"
}
}
]
}
]
}
Response Breakdown
  • prices: multiple price list available
    • sku: Stock unique unit for this variation (can be null for some products).
    • image: The image linked to the variant(show more)
      • file_small: The URL to the small version of the image.
      • file_large: The URL to the large version of the image.
      • file_type: The type of the file (usually "image").
    • regular_price: The regular price of the product.
    • sale_price: The sale price (if any, otherwise null).
    • stock: The stock status (e.g., in-stock, out-of-stock).
    • pcs: Quantity available, which may be null for non-quantifiable products.
    • attributes: The attributes linked to the variant(show more)
      • id: unique ID of attribute
      • name: name of attribute
      • parent:
        • id: unique ID of attribute
        • name: parent name of attribute
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
}
}
Response Breakdown
  • prices: single price list available
    • type: The type of product (e.g., file, video, etc.).
    • regular_price: The regular price of the product.
    • sale: The sale price (if any, otherwise null).
    • stock: The stock status (e.g., in-stock, out-of-stock).
    • fileID: The unique identifier for the associated file (if the product is virtual, like a downloadable file).
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"
}
}
Response Breakdown
  • prices: single price list available
    • type: The type of product (e.g., link, file, etc.).
    • regular_price: The regular price of the product.
    • sale: The sale price (if any, otherwise null).
    • stock: The stock status (e.g., in-stock, out-of-stock).
    • link: The URL link to the virtual product (for products that are linked, such as downloadable content or external resources).
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"
}
]
}
}
Response Breakdown
  • prices: single price list available
    • type: The type of product (e.g., video, file, etc.).
    • regular_price: The regular price of the product.
    • sale: The sale price (if any, otherwise null).
    • stock: The stock status (e.g., in-stock, out-of-stock).
    • videos: (show more)
      • linkURL: The URL to the video (e.g., YouTube link or other video platforms).
      • accessURL: Specifies the type of access to the video (e.g., free-access or 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"
}
Response Breakdown
  • id: The unique identifier for the file.
  • name: The URL of the file, pointing to its location on the HitMe CDN server.
  • size: The size of the file in kilobytes (KB).
  • type: The type of the file (e.g., image, video, document, etc.).