Skip to main content
REST API

How to use public REST API to manage products, catalogs and run Catalog Machine jobs

Updated over 4 years ago

Use our public REST API to access your Catalog Machine data from external systems and integrations. You can

  • Retrieve and update products

  • Sync Shopify products

  • Import CSV

  • Get orders

  • Get catalogs

  • Rebuild catalog PDF

API Usage

You need API key to communicate with our API. Find API Key on Automation page  API section:

Usage: 

A header is more secure way as web logs will not display it as part of URL.

API Rate Limit

The Catalog Machine API applies rate limits to the API requests that it receives. HTTP 429 Too Many Requests error is returned if the rate is exceeded.

API Resources

Products

Retrieve a list of products
The method limits products by default to 100, max limit is 250

  • GET /products

Retrieve filtered list of products by category, collection number or limit returned product by page and number of records per page

  • GET /products?category={category}&collection={collection}&limit={products_per_page}&page={page}

Response:

{
  "products": [
    {
      "Code": "123",
      "Name": "Shirt",
      "Category": "Apparel",
      "Description": "Shirt description",
      "Price": "14.99",
      "Image": "https://...",
      "Fabric": "100% cotton.",
      "MSRP": "17.99",
      "Variants": [
      {
          "Size": "XL",
          "Price": "14.99",
          "SKU": "1234",
          "Image": "https://...",
          "Barcode": "1234567",
          "Quantity": 25
      },
      "Collections": [
        "Shirts"
      ]
    },
    ...
}

Response will return all your product fields, variants and collections

Retrieve a product by code

  • GET /products/{code}

{
  "product": {
      "Code": "123",
      "Name": "Shirt",
      ...
   }
}


Update a product

  • POST /products/{code}

Send the same structure with updates as you receive from GET /products/{code}

Bulk product update

  • POST /products

{
  "products": [
  {
      "Code": "{code}",
      "Name": "Shirt",  
      ...
   },
   {
      "Code": "201",
      "Name": "Product B",
      ...
   }
  ]
}


Delete a product

  • DELETE  /products/{code}

Bulk product delete

  • DELETE /products

{
  "codes": ["{code1}","{code2}",...]
}

List product categories

  • GET /categories

{
  "categories": [
    {
      "Name": "Category1",
      "FullName": "Category1",
      "Description": "My Category",
      "Fields": [
        {
          "Name": "Description",
          "DataType": "Rich Text"
        },
        {
          "Name": "Image",
          "DataType": "Image"
        },
        {
          "Name": "Price",
          "DataType": "Money"
        },
        {
          "Name": "Brand",
          "DataType": "Text"
        }
      ]
    },
    ...
  ]
}

Import

Import products from ShopifyThis method will re-import already existing products in Catalog Machine and update all fields - prices, images, variants, etc. You still need to manually import new Shopify products to include later in the sync.

  • GET /import/shopify/sync

{
  "Status": "importing",
  "JobId": "shopify-import"
}

Import Job Status

  • GET /jobs/import/shopify-import

Import products from CSV
Import CSV from remote public url or POST CSV content. 

  • POST /import/csv?fileLink={remote_csv_link}

  • POST /import/csv

Response

{
  "Errors": [],
  "Success": true,
  "RecordsCount": 1,
  "JobId": "csv-import"
}

Ensure correct format of product CSV for import. All products with errors will be ignored! Product records format should strictly match our formatting rules.

Import Job Status

  • GET /jobs/import/csv-import

Orders

Get open orders or filter orders by status or page. The method limits data by default to 100, max limit is 250.

  • GET /orders

  • GET /orders?status={status}&limit={orders_per_page}&page={page}

{
  "orders": [
    {
      "Id": "f103",
      "Created": "2020-01-30",
      "FirstName": "First",
      "LastName": "Name",
      "Email": "[email protected]",
      "Phone": "12345",
      "Source": "Showroom",
      "Total": 50.25,
      "Products": [
        {
          "Code": "A00",
          "Name": "Product 1",
          "Quantity": 1,
          "Price": 50.25
        }
      ],
      "Link": "https://www.catalogmachine.com/app/orders/f103"
    },
    ...,
    total: 200
  ]
}

Catalogs

Retrieve catalog list

Retrieve public catalog list (published with public privacy) or by status (published,draft)

  • GET /catalogs 

  • GET /catalogs?status={status} 

{
  "catalogs": [
    {
      "Id": "b69",
      "Permalink": "my-catalog",
      "Name": "My Catalog",
      "Status": "Published",
      "Privacy": "Public",
      "Modified": "2020-01-30",
      "HtmlLink": "https://www.catalogmachine.com/my-business/catalogs/my-catalog.html",
      "PdfLink": "https://www.catalogmachine.com/my-business/catalogs/my-catalog.pdf"
    },
    ...
  }
]


Rebuild catalog PDF by permalink

  • GET /catalogs/{permalink}/rebuild

Response includes job id for the re-generation job

{
  "Status": "processing",
  "JobId": "my-catalog"
}

Check job status and errors and warnings

  • GET /jobs/catalogs/{jobId}

{
  "status": "success",
  "errors": [
    {
      "PageNumber": 2,
      "Message": "Image is not found or deleted image.jpg"
    },
    ...
  ]
}


Did this answer your question?