NAV
shell
  • Introduction
  • Authentication
  • Admin
  • Attributes
  • Attribute Type Values
  • Attribute Sets
  • Attribute Set Attributes
  • Blocks
  • Block Assets
  • Brands
  • Brand Assets
  • Brand Attributes
  • Categories
  • Category Assets
  • Category Channels
  • Channels
  • Display Groups
  • Exports
  • Generic Entities
  • Concrete Entities
  • Options
  • Option Values
  • Option Sets
  • Option Set Options
  • Pages
  • Page Assets
  • Products
  • Product Assets
  • Product Barcodes
  • Product Categories
  • Product Prices
  • Product Inventory
  • Product Attributes
  • Product Channels
  • Product Relation Types
  • Product Relations
  • Product Relation Attributes
  • Product Tags
  • Templates
  • Webhooks
  • Errors
  • Introduction

    Welcome to the Jasper Standard PIM v1 API documentation.

    We have provided examples for command line use as well as via our PHP SDK. You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

    Authentication

    # With shell, you can just pass the correct header with each request
    curl "https://yourpim.com/api/v1/ping"
      -H "Authorization: Bearer {token}"
    # Note: when entering your curl request on the command line, add all options (such as -H, -d, -X etc) on the same line
    

    Make sure to replace token with your API token.

    Jasper uses API keys to allow access to the API. Contact your account representative to receive a key for your PIM.

    Jasper expects for the API key to be included in all API requests to the server in a header that looks like the following:

    Authorization: Bearer {token}

    Admin

    Ping

    curl "https://yourpim.com/api/v1/ping" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
            "time" : "Tue Feb 7 19:05:03 UTC 2017"
    }
    

    This endpoint returns the current PIM server time.

    Ping Properties

    Property Description
    time Current server time

    HTTP Request

    GET https://yourpim.com/api/v1/ping

    Query Parameters

    None.

    Attributes

    Attribute Properties

    Property Description
    id Jasper Attribute ID
    name Attribute name (must be unique)
    type (enum) Attribute type (allowed values: selectbox, date, text, textarea, multiselect)
    note User information about the attribute
    display_group Used for display grouping in the PIM UI
    sort_order (integer) The sort order for display
    publish (boolean) Whether to publish the attribute
    version_id The ID of the version
    created_at Time the attribute was created (read only)
    updated_at Time the attribute was updated (read only)

    Get All Attributes

    curl "https://yourpim.com/api/v1/attributes" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "attributes": [
        {
          "id": 1,
          "name": "Brand",
          "type": "text",
          "display_group_id": null,
          "sort_order": 0,
          "slug": "Brand",
          "publish": true,
          "typeValuesArray": []
        },
        {
          "id": 2,
          "name": "Country",
          "type": "multiselect",
          "display_group_id": null,
          "sort_order": 0,
          "slug": "Country",
          "publish": true,
          "typeValuesArray": [
            {
              "id": 1,
              "attribute_id": 2,
              "value": "Brazil",
              "slug": "Brazil",
              "sort_order": 1,
              "version_id": 0
            },
            {
              "id": 2,
              "attribute_id": 2,
              "value": "Canada",
              "slug": "Canada",
              "sort_order": 2,
              "version_id": 0
            },
            {
              "id": 3,
              "attribute_id": 2,
              "value": "France",
              "slug": "France",
              "sort_order": 3,
              "version_id": 0
            },
            {
              "id": 4,
              "attribute_id": 2,
              "value": "USA",
              "slug": "USA",
              "sort_order": 4,
              "version_id": 0
            }
          ]
        }
      ]
    }
    

    This endpoint retrieves all attributes.

    HTTP Request

    GET https://yourpim.com/api/v1/attributes

    Get All Attributes By Version

    curl "https://yourpim.com/api/v1/attributes/version/1" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "attributes": [
        {
          "id": 1,
          "name": "Marca",
          "type": "text",
          "display_group_id": null,
          "sort_order": 0,
          "slug": "Brand",
          "publish": true,
          "typeValuesArray": []
        },
        {
          "id": 2,
          "name": "Pais",
          "type": "multiselect",
          "display_group_id": null,
          "sort_order": 0,
          "slug": "Country",
          "publish": true,
          "typeValuesArray": [
            {
              "id": 6,
              "attribute_id": 2,
              "value": "Brasil",
              "slug": "Brasil",
              "sort_order": 1,
              "version_id": 1,
              "master_attribute_type_value_id": 1
            },
            {
              "id": 17,
              "attribute_id": 2,
              "value": "Canada",
              "slug": "Canada",
              "sort_order": 2,
              "version_id": 1,
              "master_attribute_type_value_id": 2
            },
            {
              "id": 18,
              "attribute_id": 2,
              "value": "França",
              "slug": "França",
              "sort_order": 3,
              "version_id": 1,
              "master_attribute_type_value_id": 3
            },
            {
              "id": 19,
              "attribute_id": 2,
              "value": "Estados Unidos",
              "slug": "Estados Unidos",
              "sort_order": 4,
              "version_id": 1,
              "master_attribute_type_value_id": 4
            }
          ]
        }
      ]
    }
    

    This endpoint retrieves all attributes of the version.

    HTTP Request

    GET https://yourpim.com/api/v1/attributes/version/<VERSION_ID>

    URL Parameters

    Parameter Description
    VERSION_ID The ID of the version

    Get a Specific Attribute

    curl "https://yourpim.com/api/v1/attributes/1" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "attribute": {
        "id": 1,
        "name": "Brand",
        "type": "text",
        "display_group_id": null,
        "note": null,
        "length": null,
        "sort_order": 0,
        "slug": "Brand",
        "publish": true,
        "typeValuesArray": []
      }
    }
    

    This endpoint retrieves a specific attribute.

    HTTP Request

    GET https://yourpim.com/api/v1/attributes/<ATTRIBUTE_ID>

    URL Parameters

    Parameter Description
    ATTRIBUTE_ID The ID of the attribute to retrieve

    Get a Specific Attribute by Version

    curl "https://yourpim.com/api/v1/attributes/1/version/1" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "attribute": {
        "id": 1,
        "name": "Marca",
        "type": "text",
        "display_group_id": null,
        "note": null,
        "length": null,
        "sort_order": 0,
        "slug": "Brand",
        "publish": true,
        "typeValuesArray": []
      }
    }
    

    This endpoint retrieves a specific attribute by version.

    HTTP Request

    GET https://yourpim.com/api/v1/attributes/<ATTRIBUTE_ID>/version/<VERSION_ID>

    URL Parameters

    Parameter Description
    ATTRIBUTE_ID The ID of the attribute to retrieve
    VERSION_ID The ID of the version

    Create a Attribute

    curl "https://yourpim.com/api/v1/attributes" \
      -X POST \
      -d '{
        "name": "Shipment Type",
        "type": "text",
        "sort_order": 3,
        "publish": false
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "attribute" : {
            "id" : 3,
            "name": "Shipment Type",
            "type": "text",
            "sort_order": 3,
            "publish": false
      }
    }
    

    This endpoint creates a new attribute.

    HTTP Request

    POST https://yourpim.com/api/v1/attributes

    Update a Specific Attribute

    curl "https://yourpim.com/api/v1/attributes/2" \
      -X PUT \
      -d '{
        "name":"Countries of origin"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "attribute" : {
                "id": 2,
                "name": "Countries of origin",
                "type" : "text",
                "sort_order" : 2,
                "publish" : true
      } 
    }
    

    This endpoint updates a specific attribute.

    HTTP Request

    PUT https://yourpim.com/api/v1/attributes/<ATTRIBUTE_ID>

    URL Parameters

    Parameter Description
    ATTRIBUTE_ID The ID of the attribute to update

    Update a Specific Attribute Version

    curl "https://yourpim.com/api/v1/attributes/2/version/1" \
      -X PUT \
      -d '{
        "name":"País"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "attribute": {
        "id": 2,
        "name": "Pais",
        "type": "multiselect",
        "display_group_id": null,
        "note": null,
        "length": null,
        "sort_order": 0,
        "slug": "Country",
        "publish": true
      }
    }
    

    This endpoint updates a specific attribute.

    HTTP Request

    PUT https://yourpim.com/api/v1/attributes/<ATTRIBUTE_ID>/version/<VERSION_ID>

    URL Parameters

    Parameter Description
    ATTRIBUTE_ID The ID of the attribute to update
    VERSION_ID The ID of the version

    Delete a Specific Attribute

    curl "https://yourpim.com/api/v1/attributes/2" \
      -X DELETE \
      -H "Authorization: Bearer {token}"
    

    This endpoint deletes a specific attribute.

    HTTP Request

    DELETE https://yourpim.com/api/v1/attributes/<ATTRIBUTE_ID>

    URL Parameters

    Parameter Description
    ATTRIBUTE_ID The ID of the attribute to delete

    Delete a Specific Attribute Version

    curl "https://yourpim.com/api/v1/attributes/<ATTRIBUTE_ID>/version/<VERSION_ID>" \
      -X DELETE \
      -H "Authorization: Bearer {token}"
    

    This endpoint deletes a specific attribute.

    HTTP Request

    DELETE https://yourpim.com/api/v1/attributes/<ATTRIBUTE_ID>/version/<VERSION_ID>

    URL Parameters

    Parameter Description
    ATTRIBUTE_ID The ID of the attribute to delete
    VERSION_ID The ID of the version

    Attribute Type Values

    Attribute Type Value Properties

    Property Description
    id Jasper attribute type value ID
    attribute_id ID of the attribute to which the type value belongs
    value Type value (e.g. for drop down list)
    version_id The ID of the version
    created_at Time the type value was created (read only)
    updated_at Time the type value was updated (read only)

    Get All Attribute Type Values

    curl "https://yourpim.com/api/v1/attributes/1/type_values" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "attribute_type_values" :
            [
              {
                "id": 1,
                "attribute_id": 1,
                "value" : "Yes"
              },
              {
                "id": 2,
                "attribute_id": 1,
                "value" : "No"
              }
            ]
    }
    

    This endpoint retrieves all attribute type values for a specific attribute.

    HTTP Request

    GET https://yourpim.com/api/v1/attributes/<ATTRIBUTE_ID>/type_values

    URL Parameters

    Parameter Description
    ATTRIBUTE_ID The ID of the attribute whose type values to retrieve

    Get All Attribute Type Values by Version

    curl "https://yourpim.com/api/v1/attributes/1/type_values/version/1" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "attribute_type_values" :
            [
              {
                "id": 1,
                "attribute_id": 1,
                "value" : "Sim"
              },
              {
                "id": 2,
                "attribute_id": 1,
                "value" : "Não"
              }
            ]
    }
    

    This endpoint retrieves all attribute type values for a specific attribute.

    HTTP Request

    GET https://yourpim.com/api/v1/attributes/<ATTRIBUTE_ID>/type_values/version/<VERSION_ID>

    URL Parameters

    Parameter Description
    ATTRIBUTE_ID The ID of the attribute whose type values to retrieve
    VERSION_ID The ID of the version

    Get a Specific Attribute Type Value

    curl "https://yourpim.com/api/v1/attributes/2/type_values/1" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "attribute_type_value" : {
        "id": 1,
        "attribute_id": 2,
        "value" : "Yes",
        "version_id": 0
      }
    }
    

    This endpoint retrieves the specific attribute type value.

    HTTP Request

    GET https://yourpim.com/api/v1/attributes/<ATTRIBUTE_ID>/type_values/<TYPE_VALUE_ID>

    URL Parameters

    Parameter Description
    ATTRIBUTE_ID The ID of the attribute type value to retrieve
    TYPE_VALUE_ID The ID of the attribute whose type value to retrieve

    Get a Version of the Specific Attribute Type Value

    curl "https://yourpim.com/api/v1/attributes/2/type_values/1/version/1" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "attribute_type_value" : {
        "id": 1,
        "attribute_id": 2,
        "value" : "Sim",
        "version_id": 1
      }
    }
    

    This endpoint retrieves a version of the specific attribute type value.

    HTTP Request

    GET https://yourpim.com/api/v1/attributes/<ATTRIBUTE_ID>/type_values/<TYPE_VALUE_ID>/version/<VERSION_ID>

    URL Parameters

    Parameter Description
    ATTRIBUTE_ID The ID of the attribute type value to retrieve
    TYPE_VALUE_ID The ID of the attribute whose type value to retrieve
    VERSION_ID The ID of the version

    Create a Attribute Type Value

    curl "https://yourpim.com/api/v1/attributes/2/type_values" \
      -X POST \
      -d '{
                "value" : "Blue"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "attribute_type_value" : {
                "id": 3,
                "attribute_id": 2,
                "value" : "Blue"
      }
    }
    

    This endpoint creates a new attribute type value.

    HTTP Request

    POST https://yourpim.com/api/v1/attributes/<ATTRIBUTE_ID>/type_values

    URL Parameters

    Parameter Description
    ATTRIBUTE_ID The ID of the attribute

    Update Attribute Type Value

    curl "https://yourpim.com/api/v1/attributes/2/type_values/1" \
      -X PUT \
      -d '{
        "name":"Country of origin"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "attribute_type_value": {
        "id": 1,
        "attribute_id": 2,
        "value": "Country of origin",
        "version_id": 0
      }
    }
    

    This endpoint updates the specific attribute type value.

    HTTP Request

    PUT https://yourpim.com/api/v1/attributes/<ATTRIBUTE_ID>/type_values/<TYPE_VALUE_ID>

    URL Parameters

    Parameter Description
    ATTRIBUTE_ID The ID of the attribute
    TYPE_VALUE_ID The ID of the attribute type value

    Update the Version of the Attribute Type Value

    curl "https://yourpim.com/api/v1/attributes/2/type_values/1/version/1" \
      -X PUT \
      -d '{
        "name":"País"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "attribute_type_value": {
        "id": 6,
        "attribute_id": 2,
        "value": "País",
        "slug": null,
        "version_id": 1
      }
    }
    

    This endpoint updates a version of the specific attribute type value.

    HTTP Request

    PUT https://yourpim.com/api/v1/attributes/<ATTRIBUTE_ID>/type_values/<TYPE_VALUE_ID>/version/<VERSION_ID>

    URL Parameters

    Parameter Description
    ATTRIBUTE_ID The ID of the attribute
    TYPE_VALUE_ID The ID of the attribute type value
    VERSION_ID The ID of the version

    Delete a Specific Attribute Type Value

    curl "https://yourpim.com/api/v1/attributes/2/type_values/1" \
      -X DELETE \
      -H "Authorization: Bearer {token}"
    

    This endpoint deletes a specific attribute type value.

    HTTP Request

    DELETE https://yourpim.com/api/v1/attributes/ATTRIBUTE_ID/type_values/TYPE_VALUE_ID

    URL Parameters

    Parameter Description
    ATTRIBUTE_ID The ID of the attribute to delete
    TYPE_VALUE_ID The ID of the type value

    Delete a Version of the Specific Attribute Type Value

    curl "https://yourpim.com/api/v1/attributes/2/type_values/1/version/1" \
      -X DELETE \
      -H "Authorization: Bearer {token}"
    

    This endpoint deletes a version of the specific attribute type value.

    HTTP Request

    DELETE https://yourpim.com/api/v1/attributes/ATTRIBUTE_ID/type_values/TYPE_VALUE_ID/version/VERSION_ID

    URL Parameters

    Parameter Description
    ATTRIBUTE_ID The ID of the attribute to delete
    TYPE_VALUE_ID The ID of the type value
    VERSION_ID The ID of the version

    Attribute Sets

    Attribute Set Properties

    Property Description
    id Jasper Attribute Set ID
    name Attribute Set name (must be unique)
    sort_order (integer) The sort order for display

    Get All Attribute Sets

    curl "https://yourpim.com/api/v1/attribute_sets" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "attribute_sets" :
            [
              {
                "id": 1,
                "name": "Shoes",
                "sort_order" : 1
              },
              {
                "id": 2,
                "name": "Bow Ties",
                "sort_order" : 2
              }
            ]
    }
    

    This endpoint retrieves all attribute sets.

    HTTP Request

    GET https://yourpim.com/api/v1/attribute_sets

    Get a Specific Attribute Set

    curl "https://yourpim.com/api/v1/attribute_sets/2" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "attribute_set" : {
                "id": 2,
                "name": "Bow Ties",
                "sort_order" : 2
      }
    }
    

    This endpoint retrieves a specific attribute set.

    HTTP Request

    GET https://yourpim.com/api/v1/attribute_sets/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the attribute set to retrieve

    Create a Attribute Set

    curl "https://yourpim.com/api/v1/attribute_sets" \
      -X POST \
      -d '{
        "name" : "Gaskets",
        "sort_order" : 3
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "attribute set" : {
            "id" : 3,
            "name" : "Gaskets",
            "sort_order" : 3
      }
    }
    

    This endpoint creates a new attribute set.

    HTTP Request

    POST https://yourpim.com/api/v1/attribute_sets

    Update a Specific Attribute Set

    curl "https://yourpim.com/api/v1/attribute_sets/2" \
      -X PUT \
      -d '{
        "name":"Bikes"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "attribute set" : {
                "id": 2,
                "name':'Bikes"
                "sort_order": 2
      } 
    }
    

    This endpoint updates a specific attribute set.

    HTTP Request

    PUT https://yourpim.com/api/v1/attribute_sets/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the attribute set to update

    Delete a Specific Attribute Set

    curl "https://yourpim.com/api/v1/attribute_sets/2" \
      -X DELETE \
      -H "Authorization: Bearer {token}"
    

    This endpoint deletes a specific attribute set.

    HTTP Request

    DELETE https://yourpim.com/api/v1/attribute_sets/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the attribute set to delete

    Attribute Set Attributes

    Attribute Set Attribute Properties

    Property Description
    id Jasper attribute set attribute ID
    attribute_id ID of the attribute
    attribute_set_id IO of the attribute set

    Get All Attribute Set Attributes

    curl "https://yourpim.com/api/v1/attribute_sets/1/attributes" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "attribute_set_attributes" :
            [
              {
                "id": 1,
                "attribute_id": 1
                "attribute_set_id" : 1
              },
              {
                "id": 2,
                "attribute_id": 2
                "attribute_set_id" : 1
              }
            ]
    }
    

    This endpoint retrieves all attribute set attributes for a specific attribute set.

    HTTP Request

    GET https://yourpim.com/api/v1/attribute_sets/<ATTRIBUTESETID>/attributes

    URL Parameters

    Parameter Description
    ATTRIBUTESETID The ID of the attribute set whose attributes to retrieve

    Create a Attribute Set Attribute

    curl "https://yourpim.com/api/v1/attribute_sets/2/attributes" \
      -X POST \
      -d '{
                "attribute_id" : 3
       }' \
      -H "Authorization: Bearer {token}"
    

    This endpoint creates a new attribute set attribute.

    HTTP Request

    POST https://yourpim.com/api/v1/attribute_sets/<ATTRIBUTESETID>/attributes

    URL Parameters

    Parameter Description
    ATTRIBUTESETID The ID of the attribute set

    Delete a Specific Attribute Set Attribute

    curl "https://yourpim.com/api/v1/attribute_sets/2/attributes/1" \
      -X DELETE \
      -H "Authorization: Bearer {token}"
    

    This endpoint deletes a specific attribute set attribute.

    HTTP Request

    DELETE https://yourpim.com/api/v1/attribute_sets/<ATTRIBUTESETID>/attributes/<ID>

    URL Parameters

    Parameter Description
    ID The attribute ID to delete
    ATTRIBUTESETID The ID of the attribute set whose attribute to delete

    Blocks

    Block Properties

    Property Description
    id Jasper Block ID
    name Block name
    slug Slug
    content Content

    Get All Blocks

    curl "https://yourpim.com/api/v1/blocks" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "blocks" :
            [
              {
                "id": 1,
                "name": "Main Script",
                "slug": "main-script",
                ...
              },
              {
                "id": 2,
                "name": "Footer Script",
                "slug": "footer-script"
                ...
              }
            ]
    }
    

    This endpoint retrieves all blocks.

    HTTP Request

    GET https://yourpim.com/api/v1/blocks

    Get a Specific Block

    curl "https://yourpim.com/api/v1/blocks/2" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "block" : {
                "id": 2,
                "name": "Footer Script",
                "slug": "footer-script"
                ...
      }
    }
    

    This endpoint retrieves a specific block.

    HTTP Request

    GET https://yourpim.com/api/v1/blocks/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the block to retrieve

    Create a Block

    curl "https://yourpim.com/api/v1/blocks" \
      -X POST \
      -d '{
        "name":"Header Script",
        "slug":"header-script"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "block" : {
          "id" : 3,
          "name" : "Header Script",
          "slug" : "header-script"
          ...
      }
    }
    

    This endpoint creates a new block.

    HTTP Request

    POST https://yourpim.com/api/v1/blocks

    Update a Specific Block

    curl "https://yourpim.com/api/v1/blocks/2" \
      -X PUT \
      -d '{
        "name":"Other Script"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "block" : {
            "id": 2,
            "name": "Other Script",
            "slug": "Footer Script"
          ...
      } 
    }
    

    This endpoint updates a specific block.

    HTTP Request

    PUT https://yourpim.com/api/v1/blocks/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the block to update

    Block Assets

    Block Asset Properties

    Property Description
    id Jasper block asset ID
    block_id ID of the block to which the asset belongs
    uri URI
    alttext Image alternate text
    sort_order Sort order of the asset
    thumbnail (boolean) Whether the asset is the thumbnail

    Get All Block Assets

    curl "https://yourpim.com/api/v1/blocks/1/assets" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "block_assets" :
            [
              {
                "id": 1,
                "block_id": 1
                "uri": "https://cdnpim.com/coolimage.png",
                "alttext": "Description of image",
                "sort_order": 1,
                "thumbnail": 1
              },
              {
                "id": 2,
                "block_id": 1
                "uri": "https://cdnpim.com/coolimage.png",
                "alttext": "Description of image",
                "sort_order": 2
                "thumbnail": 0
              }
            ]
    }
    

    This endpoint retrieves all block assets for a specific block.

    HTTP Request

    GET https://yourpim.com/api/v1/blocks/<PAGEID>/assets

    URL Parameters

    Parameter Description
    PAGEID The ID of the block whose assets to retrieve

    Get a Specific Block Asset

    curl "https://yourpim.com/api/v1/blocks/2/assets/1" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "block_asset" : {
                "id": 1,
                "block_id": 2
                "uri": "https://cdnpim.com/coolimage.png",
                "alttext": "Description of image",
                "sort_order": 1,
                "thumbnail" : 1
      }
    }
    

    This endpoint retrieves a specific block asset.

    HTTP Request

    GET https://yourpim.com/api/v1/blocks/<PAGEID>/assets/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the block asset to retrieve
    PAGEID The ID of the block whose assets to retrieve

    Brands

    Brand Properties

    Property Description
    id Jasper Brand ID
    name Brand name
    desc Description
    seo_meta_desc Meta description
    seo_meta_keywords Meta keywords
    seo_meta_title Meta page title
    search_keywords Comma separated list of search keywords

    Get All Brands

    curl "https://yourpim.com/api/v1/brands" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "brands" :
            [
              {
                "id": 1,
                "name": "Nike",
                ...
              },
              {
                "id": 2,
                "name": "Adidas",
                ...
              }
            ]
    }
    

    This endpoint retrieves all brands.

    HTTP Request

    GET https://yourpim.com/api/v1/brands

    Get a Specific Brand

    curl "https://yourpim.com/api/v1/brands/2" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "brand" : {
          "id": 2,
          "name": "Adidas",
          ...
      }
    }
    

    This endpoint retrieves a specific brand.

    HTTP Request

    GET https://yourpim.com/api/v1/brands/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the brand to retrieve

    Create a Brand

    curl "https://yourpim.com/api/v1/brands" \
      -X POST \
      -d '{
        "name":"New Adidas"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "brand" : {
          "id" : 3,
          "name": "New Adidas",
          ...
      }
    }
    

    This endpoint creates a new brand.

    HTTP Request

    POST https://yourpim.com/api/v1/brands

    Update a Specific Brand

    curl "https://yourpim.com/api/v1/brands/2" \
      -X PUT \
      -d '{
        "name":"New Adidas"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "brand" : {
          "id" : 2,
          "name": "New Adidas",
          ... 
      } 
    }
    

    This endpoint updates a specific brand.

    HTTP Request

    PUT https://yourpim.com/api/v1/brands/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the brand to update

    Delete a Specific Brand

    curl "https://yourpim.com/api/v1/brands/2" \
      -X DELETE \
      -H "Authorization: Bearer {token}"
    

    This endpoint deletes a specific brand.

    HTTP Request

    DELETE https://yourpim.com/api/v1/brands/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the brand to delete

    Brand Assets

    Brand Asset Properties

    Property Description
    id Jasper Brand asset ID
    brand_id ID of the brand to which the asset belongs
    uri URI
    alttext Image alternate text
    thumbnail (boolean) Whether the asset is the thumbnail

    Get All Brand Assets

    curl "https://yourpim.com/api/v1/brands/1/assets" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "brand_assets" :
            [
              {
                "id": 1,
                "brand_id": 1
                "uri": "https://cdnpim.com/coolimage.png",
                "alttext": "Description of image",
                "thumbnail" : 1
              },
              {
                "id": 2,
                "brand_id": 1
                "uri": "https://cdnpim.com/coolimage.png",
                "alttext": "Description of image",
                "thumbnail" : 0
              }
            ]
    }
    

    This endpoint retrieves all brand assets for a specific brand.

    HTTP Request

    GET https://yourpim.com/api/v1/brands/<BRANDID>/assets

    URL Parameters

    Parameter Description
    BRANDID The ID of the brand whose assets to retrieve

    Get a Specific Brand Asset

    curl "https://yourpim.com/api/v1/brands/2/assets/1" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "brand_asset" : {
                "id": 1,
                "brand_id": 2
                "uri": "https://cdnpim.com/coolimage.png",
                "alttext": "Description of image",
                "thumbnail" : 1
      }
    }
    

    This endpoint retrieves a specific brand asset.

    HTTP Request

    GET https://yourpim.com/api/v1/brands/<BRANDID>/assets/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the brand asset to retrieve
    BRANDID The ID of the brand whose assets to retrieve

    Create a Brand Asset

    curl "https://yourpim.com/api/v1/brands/2/assets" \
      -X POST \
      -d '{
                "source_uri": "https://cdnpim.com/coolimage.png",
                "alttext": "Description of image",
                "thumbnail" : 1
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "brand_asset" : {
                "id": 42,
                "brand_id": 2,
                "uri": "https://cdnpim.com/coolimage.png",
                "alttext": "Description of image",
                "thumbnail" : 1
      }
    }
    

    This endpoint creates a new brand asset.

    HTTP Request

    POST https://yourpim.com/api/v1/brands/<BRANDID>/assets

    URL Parameters

    Parameter Description
    BRANDID The ID of the brand

    Update a Specific Brand Asset

    curl "https://yourpim.com/api/v1/brands/2/assets/1" \
      -X PUT \
      -d '{
            "source_uri": "https://cdnpim.com/coolimage.png",
            "alttext": "Description of image",
            "thumbnail" : 1
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "brand_asset" : {
            "id": 1
            "brand_id" : 2,
            "uri": "https://cdnpim.com/coolimage.png",
            "alttext": "Description of image",
            "thumbnail" : 1
      } 
    }
    

    This endpoint updates a specific brand asset.

    HTTP Request

    PUT https://yourpim.com/api/v1/brands/<BRANDID>/assets/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the brand asset to update
    BRANDID The ID of the brand whose asset to update

    Delete a Specific Brand Asset

    curl "https://yourpim.com/api/v1/brands/2/assets/1" \
      -X DELETE \
      -H "Authorization: Bearer {token}"
    

    This endpoint deletes a specific brand asset.

    HTTP Request

    DELETE https://yourpim.com/api/v1/brands/<BRANDID>/assets/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the brand asset to delete
    BRANDID The ID of the brand whose asset to delete

    Brand Attributes

    Brand Attribute Properties

    Property Description
    id Jasper Attribute ID
    name Attribute name (must be unique)
    slug Slugified Attribute name
    user_defined_key User Key
    type (enum) Attribute type (allowed values: selectbox, date, datetime, textarea, multiselect, text)
    values The Attributes Value

    Get All Brand Attributes

    curl "https://yourpim.com/api/v1/brands/1/attributes" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "brand_attributes" : [
        {
          "attribute_id" : 1,
          "name" : "Attribute One",
          "slug" : "attribute-one",
          "user_defined_key" : "{}",
          "type" : "text",
          "values" : []
        },
        {
          "attribute_id" : 2,
          "name" : "Attribute Two",
          "slug" : "attribute-two",
          "user_defined_key" : "{}",
          "type" : "selectbox",
          "values" : [
            {
              "id" : 1,
              "version_id" : 0,
              "value" : "Selected"
            }
          ]
        }
      ]
    }
    

    This endpoint retrieves all brand attributes.

    HTTP Request

    GET https://yourpim.com/api/v1/brands/<ID>/attributes/

    URL Parameters

    Parameter Description
    ID The ID of the brand related with the attributes to retrieve

    Get A Brand Attribute

    curl "https://yourpim.com/api/v1/brands/1/attributes/1" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "brands_attributes" : [
        {
          "attribute_id" : 1,
          "name" : "Attribute One",
          "slug" : "attribute-one",
          "user_defined_key" : "{}",
          "type" : "text",
          "values" : [
            {
              "id" : 1,
              "version_id" : 0,
              "value" : "Text"
            }
          ]
        }
      ]
    }
    

    This endpoint retrieves a specific brand attribute.

    HTTP Request

    GET https://yourpim.com/api/v1/brands/<ID>/attributes/<AttributeID>

    URL Parameters

    Parameter Description
    ID The ID of the brand related with the specific attribute to retrieve
    AttributeID The ID of the attribute to retrieve

    Create a Brand Attribute

    curl "https://yourpim.com/api/v1/brands/1/attributes \ 
      -X POST \
      -d '{
        "attribute_id" : 1,
        "version_id" : 0,
        "values" : [
          {
            "value" : "Text"
          }
        ]
      }'
    

    The above command returns JSON structured like this:

    {
      "brand_attributes" : {
        "attribute_id" : 1,
        "name" : "Attribute One",
        "slug" : "attribute-one",
        "user_defined_key" : "{}",
        "type" : "text",
        "values" : [
          {
            "id" : 1,
            "version_id" : 0,
            "value" : "Text"
          },
          {
            "id" : 2,
            "version_id" : 1,
            "value" : "Texte"
          }
        ]
      }
    }
    

    This endpoints creates a specific Brand Attribute.

    HTTP Request

    POST https://yourpim.com/api/v1/brands/<ID>/attributes

    URL Parameters

    Paramter Description
    ID The ID of the Brand

    Update a Specific Brand Attribute

    curl "https://yourpim.com/api/v1/brands/1/attributes/1/values/1" \
      -X PUT \
      -d '{
        "attribute_id" : 1,
        "version_id" : 1,
        "values" : [
          {
            "value" : "Text Update"
          }
        ]
      }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "brand_attributes" : {
        "attribute_id" : 1,
        "name" : "Attribute One",
        "slug" : "attribute-one",
        "user_defined_key" : "{}",
        "type" : "text",
        "values" : [
          {
            "id" : 1,
            "version_id" : 0,
            "value" : "Text"
          },
          {
            "id" : 2,
            "version_id" : 1,
            "value" : "Texte"
          }
        ]
      }
    }
    

    This endpoint updates a specific brand attribute value.

    HTTP Request

    PUT https://yourpim.com/api/v1/brands/<id>/attributes/<AttributeID>/values/<AttributeValueID>

    URL Parameters

    Parameter Description
    ID The ID of the brand
    AttributeID The ID of the attribute
    AttributeValueID The ID of the attribute value to update

    Delete a Specific Attribute Value

    curl "https://yourpim.com/api/v1/brands/1/attributes/1/values/1" \
      -X DELETE \
      -H "Authorization: Bearer {token}"
    

    This endpoint deletes a specific brand attribute value.

    HTTP Request

    DELETE https://yourpim.com/api/v1/brands/<ID>/attributes/<AttributeID>/values/<AttributeValueID>

    URL Parameters

    Parameter Description
    ID The ID of the brand
    AttributeID The ID of the attribute
    AttributeValueID The id of the attribute value to delete

    Brand Assign Attribute

    curl "https://yourpim.com/api/v1/brands/1/assigned-attributes" \ 
      -X POST \ 
      -d '{
        "attribute_id" : 1
      }'
      -H "Authorization: Bearer {token}"
    

    This endpoint assigns a specific attribute to a brand.

    HTTP Request

    POST https://yourpim.com/api/v1/brands/<ID>/assigned-attributes

    URL Parameters

    Parameter Description
    ID The ID of the brand

    Brand Assign Attribute Set

    curl "https://yourpim.com/api/v1/brands/1/assigned-attribute-sets" \
      -X POST \
      -d '{
        "attribute_set_id" : 1
      }'
      -H "Authorization: Bearer {token}"
    

    This ednpoint assigns a specific attribute set to a brand.

    HTTP Request

    POST https://yourpim.com/api/v1/brand/<ID>/assigned-attribute-sets

    URL Paramters

    Parameter Description
    ID The ID of the brand

    Categories

    Category Properties

    Property Description
    id Jasper Category ID
    parent_id ID of the parent category (set to 0 if root category) (required)
    name Category name
    desc Description
    attribute_sets (array) Attribute set IDs for the category
    is_visible (boolean) Whether to display the category
    seo_meta_desc Meta description
    seo_meta_keywords Meta keywords
    seo_meta_title Meta page title
    search_keywords Comma separated list of search keywords

    Get All Categories

    curl "https://yourpim.com/api/v1/categories" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "categories" :
            [
              {
                "id" : 1,
                "parent_id" : null
                "name" : "Shopify Root",
                "desc" : "Root for Shopify collections",
                "attribute_sets" : [1, 4, 5],
                "is_visible" : true
                ...
              },
              {
                "id" : 2,
                "parent_id" : 1
                "name" : "Shoes",
                "desc" : "Shoes",
                "attribute_sets" : [],
                "is_visible" : true
                ...
              }
            ]
    }
    

    This endpoint retrieves all categories.

    HTTP Request

    GET https://yourpim.com/api/v1/categories

    Get a Specific Category

    curl "https://yourpim.com/api/v1/categories/1" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "category" : {
                "id" : 1,
                "parent_id" : null
                "name" : "Shopify Root",
                "desc" : "Root for Shopify collections",
                "attribute_sets" : [1, 4, 5],
                "is_visible" : true
                ...
      }
    }
    

    This endpoint retrieves a specific category.

    HTTP Request

    GET https://yourpim.com/api/v1/categories/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the category to retrieve

    Create a Category

    curl "https://yourpim.com/api/v1/categories" \
      -X POST \
      -d '{
        "parent_id" : 2
        "name":"Men\'s"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "category" : {
                "id" : 3,
                "parent_id" : 2
                "name" : "Men's",
                ...
      }
    }
    

    This endpoint creates a new category.

    HTTP Request

    POST https://yourpim.com/api/v1/categories

    Update a Specific Category

    curl "https://yourpim.com/api/v1/categories/1" \
      -X PUT \
      -d '{
        "name":"Shopify New Root"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "category" : {
                "id" : 1,
                "parent_id" : null
                "name" : "Shopify New Root",
                "desc" : "Root for Shopify collections",
                "attribute_sets" : [1, 4, 5],
                "is_visible" : true
                ...
      } 
    }
    

    This endpoint updates a specific category.

    HTTP Request

    PUT https://yourpim.com/api/v1/categories/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the category to update

    Delete a Specific Category

    curl "https://yourpim.com/api/v1/categories/2" \
      -X DELETE \
      -H "Authorization: Bearer {token}"
    

    This endpoint deletes a specific category.

    HTTP Request

    DELETE https://yourpim.com/api/v1/categories/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the category to delete

    Category Assets

    Category Asset Properties

    Property Description
    id Jasper Category asset ID
    category_id ID of the category to which the asset belongs
    uri URI
    alttext Image alternate text
    thumbnail (boolean) Whether the asset is the thumbnail

    Get All Category Assets

    curl "https://yourpim.com/api/v1/categories/1/assets" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "category_assets" :
            [
              {
                "id": 1,
                "category_id": 1
                "uri": "https://cdnpim.com/coolimage.png",
                "alttext": "Description of image",
                "thumbnail" : 1
              },
              {
                "id": 2,
                "category_id": 1
                "uri": "https://cdnpim.com/coolimage.png",
                "alttext": "Description of image",
                "thumbnail" : 0
              }
            ]
    }
    

    This endpoint retrieves all category assets for a specific category.

    HTTP Request

    GET https://yourpim.com/api/v1/categories/<CATEGORYID>/assets

    URL Parameters

    Parameter Description
    CATEGORYID The ID of the category whose assets to retrieve

    Get a Specific Category Asset

    curl "https://yourpim.com/api/v1/categories/2/assets/1" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "category_asset" : {
                "id": 1,
                "category_id": 2
                "uri": "https://cdnpim.com/coolimage.png",
                "alttext": "Description of image",
                "thumbnail" : 1
      }
    }
    

    This endpoint retrieves a specific category asset.

    HTTP Request

    GET https://yourpim.com/api/v1/categories/<CATEGORYID>/assets/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the category asset to retrieve
    CATEGORYID The ID of the category whose assets to retrieve

    Create a Category Asset

    curl "https://yourpim.com/api/v1/categories/2/assets" \
      -X POST \
      -d '{
                "source_uri": "https://cdnpim.com/coolimage.png",
                "alttext": "Description of image",
                "thumbnail" : 1
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "category_asset" : {
                "id": 42,
                "category_id": 2,
                "uri": "https://cdnpim.com/coolimage.png",
                "alttext": "Description of image",
                "thumbnail" : 1
      }
    }
    

    This endpoint creates a new category asset.

    HTTP Request

    POST https://yourpim.com/api/v1/categories/<CATEGORYID>/assets

    URL Parameters

    Parameter Description
    CATEGORYID The ID of the category

    Update a Specific Category Asset

    curl "https://yourpim.com/api/v1/categories/2/assets/1" \
      -X PUT \
      -d '{
            "source_uri": "https://cdnpim.com/coolimage.png",
            "alttext": "Description of image",
            "thumbnail" : 1
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "category_asset" : {
            "id": 1
            "category_id" : 2,
            "uri": "https://cdnpim.com/coolimage.png",
            "alttext": "Description of image",
            "thumbnail" : 1
      } 
    }
    

    This endpoint updates a specific category asset.

    HTTP Request

    PUT https://yourpim.com/api/v1/categories/<CATEGORYID>/assets/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the category asset to update
    CATEGORYID The ID of the category whose asset to update

    Delete a Specific Category Asset

    curl "https://yourpim.com/api/v1/categories/2/assets/1" \
      -X DELETE \
      -H "Authorization: Bearer {token}"
    

    This endpoint deletes a specific category asset.

    HTTP Request

    DELETE https://yourpim.com/api/v1/categories/<CATEGORYID>/assets/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the category asset to delete
    CATEGORYID The ID of the category whose asset to delete

    Category Channels

    Update or Create Web ID

    curl "https://yourpim.com/api/v1/categories/680/channel/2" \  //EDIT
      -X POST \
      -d '{
            "web_id": 1
       }' \
      -H "Authorization: Bearer {token}"
    

    This endpoint updates or creates a web ID in category_channels.

    HTTP Request

    POST https://yourpim.com/api/v1/categories/<CATEGORYID>/channel/<CHANNELID>

    URL Parameters

    Parameter Description
    CATEGORYID The ID of the category.
    CHANNELID The ID of the channel.

    Channels

    Channel Properties

    Property Description
    id Jasper Channel ID
    channel_name Channel name
    sync (boolean) Whether the channel is currently enabled
    price_base Code for price book base for use on channel
    inventory_location Code for base inventory for use on channel

    Channels are read-only

    Get All Channels

    curl "https://yourpim.com/api/v1/channels" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "channels" :
            [
              {
                "id": 1,
                "channel_name": "Shopify",
                "sync": true,
                "price_base": "USD",
                "inventory_location": "NYC"
              },
              {
                "id": 2,
                "channel_name": "BigCommerce",
                "sync" : false,
                "price_base": "CAD",
                "inventory_location": "YYZ"
              }
            ]
    }
    

    This endpoint retrieves all channels.

    HTTP Request

    GET https://yourpim.com/api/v1/channels

    Get a Specific Channel

    curl "https://yourpim.com/api/v1/channels/2" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "channel" : {
          "id": 2,
          "channel_name": "BigCommerce",
          "sync" : false,
          "price_base": "CAD",
          "inventory_location": "YYZ"
      }
    }
    

    This endpoint retrieves a specific channel.

    HTTP Request

    GET https://yourpim.com/api/v1/channels/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the channel to retrieve

    Display Groups

    Display Group Properties

    Property Description
    id Jasper Display Group Id
    name Display Group Name
    sort_order (integer) the sort order for display
    is_visible (boolean) Whether to display the display group

    Get All Display Groups

    curl "https://yourpim.com/api/v1/categories" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "display_groups" :
            [
              {
                "id" : 1,
                "name" : "Textiles",
                "sort_order" : 1,
                "is_visible" : true
              },          
              {
                "id" : 2,
                "name" : "Logos",
                "sort_order" : 2,
                "is_visible" : false
              }
            ]
    }
    

    This endpoint retrieves all display groups.

    HTTP request

    Get https://yourpim.com/api/v1/display-groups

    Get a Specific Display Group

    curl "https://yourpim.com/api/v1/display-groups/1" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    
    {
      "display_group": {
                 "id" : 1,
                 "name" : "Textiles",
                 "sort_order" : 1,
                 "is_visible" : true
            }
    }         
    

    This endpoint retrieves a specific display group.

    HTTP Request

    GET https://yourpim.com/api/v1/display-groups/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the display group to retrieve

    Create a Display Group

    curl "https://yourpim.com/api/v1/display-groups" \
      -X POST \
      -d '{
        "name":"Technical Specifications"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "display_group" : {
                "id" : 3,
                "name" : "Technical Specifications"
      }
    }
    

    This endpoint creates a new display group.

    HTTP Request

    POST https://yourpim.com/api/v1/display-group

    Update a Specific Display Group

    curl "https://yourpim.com/api/v1/display-groups/1" \
      -X PUT \
      -d '{
        "name":"Textile Classifications"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "display_group" : {
            "id" : 1,
            "name" : "Textiles",
            "sort_order" : 1,
            "is_visible" : true
      }
    }
    

    This endpoint updates a specific display group.

    HTTP Request

    PUT https://yourpim.com/api/v1/display-group/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the display group to update

    Exports

    Get Export File and Status

    curl "https://yourpim.com/api/v1/exports/2" \
      -X GET \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "export" : {
            "id": 1,
            "profile_id": 1,
            "status": "queued",
            "filename": "something",
            "file_url": "https://yourpim.com/exports/1/download",
            "created_at": "2020-02-07T21:09:01+00:00"
        }
    }
    

    This endpoint gets the export status and retrieves the exported file.

    HTTP Request

    GET https://yourpim.com/api/v1/exports/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the export to check status and retrieve file

    Generic Entities

    Generic Entity Properties

    Property Description
    id Jasper generic entity ID
    name Generic entity name
    description Generic entity description
    is_tree (boolean) Whether to display the listing as a flat table or nested view
    is_product_attribute (boolean) Whether the generic entity is selectable in the product details
    priority Generic entity priority
    parent_id ID of the parent generic entity (set to null if root generic entity) (required)
    publishable (boolean) Whether the generic entity can be published to channels
    display_on_navigation (boolean) Whether the generic entity gets displayed on the navigation bar

    Get All Generic Entities

    curl "https://yourpim.com/api/v1/generic-entities" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "generic_entities" :
            [
              {
                "id" : 1,
                "name" : "Ambassador",
                "description" : "Product Ambassador campaign",
                "is_tree" : 1,
                "is_product_attribute" : 0,
                "priority" : 1,
                "parent_id" : null,
                "publishable" : 1,
                "display_on_navigation" : 1,
                "options" : []
              },
              {
                "id" : 1,
                "name" : "Lookbook",
                "description" : "Stylized model shots",
                "is_tree" : 0,
                "is_product_attribute" : 1,
                "priority" : 2,
                "parent_id" : null,
                "publishable" : 1,
                "display_on_navigation" : 1,
                "options" : []
              }
            ],
            "links": {
                "first": "http://yourpim.com/api/v1/generic-entities?page=1",
                "last": "http://yourpim.com/api/v1/generic-entities?page=1",
                "prev": null,
                "next": null
            },
            "meta": {
                "current_page": 1,
                "from": 1,
                "last_page": 1,
                "path": "http://yourpim.com/api/v1/generic-entities",
                "per_page": 1000,
                "to": 1,
                "total": 1
            }
    }
    

    This endpoint retrieves all generic entities.

    HTTP Request

    GET https://yourpim.com/api/v1/generic-entities

    Optional URL Parameter

    Parameter Description
    Page number page number

    Example: GET https://yourpim.com/api/v1/generic-entities?page=1

    Generic entities are paginated in groups of 1000

    Get a Specific Generic Entity

    curl "https://yourpim.com/api/v1/generic-entities/1" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "generic_entity" : {
                "id" : 1,
                "name" : "Ambassador",
                "description" : "Product Ambassador campaign",
                "is_tree" : 1,
                "is_product_attribute" : 0,
                "priority" : 1,
                "parent_id" : null,
                "publishable" : 1,
                "display_on_navigation" : 1,
                "options" : []
      }
    }
    

    This endpoint retrieves a specific generic entity.

    HTTP Request

    GET https://yourpim.com/api/v1/generic-entities/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the generic entity to retrieve

    Create a Generic Entity

    curl "https://yourpim.com/api/v1/generic-entities" \
      -X POST \
      -d '{
        "name" : "Designer",
        "is_tree" : 0,
        "display_on_navigation" : 1,
        "publishable" : 0,
        "is_product_attribute" : 0,
        "priority" : 3
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "generic_entity" : {
             "id" : 3, 
             "name" : "Designer",
             "description" : null,
             "parent_id" : null,
             "is_tree" : 0,
             "display_on_navigation" : 1,
             "publishable" : 0,
             "is_product_attribute" : 0,
             "priority" : 3
      }
    }
    

    This endpoint creates a new generic entity.

    HTTP Request

    POST https://yourpim.com/api/v1/generic-entities

    Update a Specific Generic Entity

    curl "https://yourpim.com/api/v1/generic-entities/1" \
      -X PUT \
      -d '{
            "name" : "Designer",
            "is_tree" : 1,
            "description" : "Product designer",
            "display_on_navigation" : 0,
            "publishable" : 1,
            "is_product_attribute" : 1,
            "priority" : 4
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "generic_entity" : {
             "id" : 3, 
             "name" : "Designer",
             "description" : "Product designer",
             "parent_id" : null,
             "is_tree" : 1,
             "display_on_navigation" : 0,
             "publishable" : 1,
             "is_product_attribute" : 1,
             "priority" : 3
      }
    }
    

    This endpoint updates a specific generic entity.

    HTTP Request

    PUT https://yourpim.com/api/v1/generic-entites/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the generic entity to update

    Delete a Specific Generic Entity

    curl "https://yourpim.com/api/v1/generic-entities/2" \
      -X DELETE \
      -H "Authorization: Bearer {token}"
    

    This endpoint deletes a specific generic entity.

    HTTP Request

    DELETE https://yourpim.com/api/v1/generic-entities/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the generic entity to delete

    Concrete Entities

    Concrete Entity Properties

    Property Description
    id Concrete entity ID
    name Concrete entity name
    parent_id ID of the parent concrete entity
    generic_entity_id ID of the generic entity to which the concrete entity is attached
    priority Concrete entity priority
    slug Concrete entity slug

    Get Generic Entity Concrete Entities

    curl "https://yourpim.com/api/v1/generic-entities/1/concrete-entities" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "concrete_entities": [
            {
                "id": 1,
                "name": "Summer Lookbook",
                "priority": 1,
                "parent_id": null,
                "generic_entity_id": 2,
                ...
            }
        ],
        "links": {
            "first": "http://yourpim.com/api/v1/generic-entities/1/concrete-entities?page=1",
            "last": "http://yourpim.com/api/v1/generic-entities/1/concrete-entities?page=1",
            "prev": null,
            "next": null
        },
        "meta": {
            "current_page": 1,
            "from": 1,
            "last_page": 1,
            "path": "http://yourpim.com/api/v1/generic-entities/1/concrete-entities",
            "per_page": 1000,
            "to": 1,
            "total": 1
        }
    }
    

    This endpoint retrieves all concrete entities assigned to a specific generic entity.

    HTTP Request

    GET https://yourpim.com/api/v1/generic-entities/<ID>/concrete-entities

    URL Parameters

    Parameter Description
    ID The ID of the generic entity from which you want to retrieve concrete entities`

    Generic entities are paginated in groups of 1000

    Get a Specific Concrete Entity

    curl "https://yourpim.com/api/v1/generic-entities/1/concrete-entities/1" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
          "concrete_entity": {
              "id": 1,
              "name": "Summer Lookbook",
              "priority": 1,
              "parent_id": null,
              "generic_entity_id": 1,
              ...
          }
    }
    

    This endpoint retrieves a specific concrete entity within a specific generic entity.

    HTTP Request

    GET https://yourpim.com/api/v1/generic-entities/<genID>/concrete-entities/<conID>

    URL Parameters

    Parameter Description
    conID The ID of the concrete entity
    genID The ID of the generic entity

    Create a Concrete Entity

    curl "https://yourpim.com/api/v1/generic-entities/1/concrete-entities/1" \
      -X POST \
      -d '{
        "name" : "Winter Lookbook",
        "priority" : 2,
      }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
          "concrete_entity": {
              "id": 1,
              "name": "Winter Lookbook",
              "priority": 2,
              "parent_id": null,
              "generic_entity_id": 1,
              ...
          }
    }
    

    This endpoint creates a concrete entity for a generic entity

    HTTP Request

    POST https://yourpim.com/api/v1/generic-entities/<ID>/concrete-entities

    URL Parameters

    Parameter Description
    ID The ID of the generic entity for which you want to create a concrete entity

    Delete a Specific Concrete Entity

    curl "https://yourpim.com/api/v1/generic-entities/1/concrete-entities/2" \
      -X DELETE \
      -H "Authorization: Bearer {token}"
    

    This endpoint deletes a specific generic entity.

    HTTP Request

    DELETE https://yourpim.com/api/v1/generic-entities/<genID>/concrete-entities/<conID>

    URL Parameters

    Parameter Description
    conID The ID of the concrete entity to delete
    genID The ID of the generic entity from which you're deleting the concrete entity

    Update a Concrete Entity

    curl "https://yourpim.com/api/v1/generic-entities/1/concrete-entities/1" \
      -X PUT \
      -d '{
            "name" : "Summer Lookbook",
            "priority" : 3,
            "parent_id" : 2,
            "generic_entity_id" : 1
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
          "concrete_entity": {
              "id": 1,
              "name": "Summer Lookbook",
              "priority": 3,
              "parent_id": 2,
              "generic_entity_id": 1,
              ...
          }
    }
    

    This endpoint updates a specific concrete entity.

    HTTP Request

    PUT https://yourpim.com/api/v1/generic-entities/<genID>/concrete-entites/<conID>

    URL Parameters

    Parameter Description
    conID The ID of the concrete entity to update
    genID The ID of the generic entity to update

    Options

    Option Properties

    Property Description
    id Jasper Option ID
    name Option name

    Get All Options

    curl "https://yourpim.com/api/v1/options" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "options" :
            [
              {
                "id": 1,
                "name": "Size"
              },
              {
                "id": 2,
                "name": "Colour"
              }
            ]
    }
    

    This endpoint retrieves all options.

    HTTP Request

    GET https://yourpim.com/api/v1/options

    Get a Specific Option

    curl "https://yourpim.com/api/v1/options/2" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "option" : {
                "id": 2,
                "name": "Colour"
      }
    }
    

    This endpoint retrieves a specific option.

    HTTP Request

    GET https://yourpim.com/api/v1/options/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the option to retrieve

    Create a Option

    curl "https://yourpim.com/api/v1/options" \
      -X POST \
      -d '{
        "name": "Finish",
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "option" : {
            "id" : 3,
            "name": "Finish",
      }
    }
    

    This endpoint creates a new option.

    HTTP Request

    POST https://yourpim.com/api/v1/options

    Update a Specific Option

    curl "https://yourpim.com/api/v1/options/2" \
      -X PUT \
      -d '{
        "name":"Type of Finish"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "option" : {
                "id": 2,
                "name": "Type of Finish"
      } 
    }
    

    This endpoint updates a specific option.

    HTTP Request

    PUT https://yourpim.com/api/v1/options/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the option to update

    Delete a Specific Option

    curl "https://yourpim.com/api/v1/options/2" \
      -X DELETE \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "message": "Deleted."
    }
    

    This endpoint deletes a specific option.

    HTTP Request

    DELETE https://yourpim.com/api/v1/options/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the option to delete

    Option Values

    Option Value Properties

    Property Description
    id Jasper option value ID
    option_id ID of the option to which the value belongs
    value Value of the Option Value
    label Label of the Option Value
    sort_order (integer) Sort order for the value
    is_default (boolean) Option value is default

    Get All Option Values

    curl "https://yourpim.com/api/v1/options/1/values" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "value_values" :
            [
              {
                "id": 1,
                "option_id": 1,
                "value" : "Yes",
                "label": "Yes"
              },
              {
                "id": 2,
                "option_id": 1,
                "value" : "No",
                "label": "No"
              }
            ]
    }
    

    This endpoint retrieves all option values for a specific option.

    HTTP Request

    GET https://yourpim.com/api/v1/options/<OPTION_ID>/values

    URL Parameters

    Parameter Description
    OPTION_ID The ID of the option whose values to retrieve

    Get a Specific Option Value

    curl "https://yourpim.com/api/v1/options/2/values/1" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "value_value" : {
        "id": 1,
        "option_id": 2,
        "value": "Yes",
        "label": "Yes"
      }
    }
    

    This endpoint retrieves a specific option value.

    HTTP Request

    GET https://yourpim.com/api/v1/options/<OPTION_ID>/values/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the option value to retrieve
    OPTION_ID The ID of the option whose value to retrieve

    Create a Option Value

    curl "https://yourpim.com/api/v1/options/2/values" \
      -X POST \
      -d '{
                "value" : "Blue",
                "label" : "Blue"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "value_value" : {
                "id": 3,
                "option_id": 2,
                "value": "Blue",
                "label": "Blue"
      }
    }
    

    This endpoint creates a new option value.

    HTTP Request

    POST https://yourpim.com/api/v1/options/<OPTION_ID>/values

    URL Parameters

    Parameter Description
    OPTION_ID The ID of the option

    Update a Specific Option Value

    curl "https://yourpim.com/api/v1/options/2/values/1" \
      -X PUT \
      -d '{
            "value": "Pink",
            "label": "Pink"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "value_value" : {
            "id": 1,
            "option_id": 2,
            "value": "Pink",
            "label": "Pink"
      } 
    }
    

    This endpoint updates a specific option value.

    HTTP Request

    PUT https://yourpim.com/api/v1/options/<OPTION_ID>/values/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the option value to update
    OPTION_ID The ID of the option whose value to update

    Delete a Specific Option Value

    curl "https://yourpim.com/api/v1/options/2/values/1" \
      -X DELETE \
      -H "Authorization: Bearer {token}"
    

    This endpoint deletes a specific option value.

    HTTP Request

    DELETE https://yourpim.com/api/v1/options/<OPTION_ID>/values/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the option value to delete
    OPTION_ID The ID of the option whose value to delete

    Option Sets

    Option Set Properties

    Property Description
    id Jasper Option Set ID
    name Option Set name

    Get All Option Sets

    curl "https://yourpim.com/api/v1/option_sets" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "option_sets" :
            [
              {
                "id": 1,
                "name": "Shoes"
              },
              {
                "id": 2,
                "name": "Bow Ties"
              }
            ]
    }
    

    This endpoint retrieves all option sets.

    HTTP Request

    GET https://yourpim.com/api/v1/option_sets

    Get a Specific Option Set

    curl "https://yourpim.com/api/v1/option_sets/2" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "attribute_set" : {
                "id": 2,
                "name": "Bow Ties"
      }
    }
    

    This endpoint retrieves a specific option set.

    HTTP Request

    GET https://yourpim.com/api/v1/option_sets/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the option set to retrieve

    Create a Option Set

    curl "https://yourpim.com/api/v1/option_sets" \
      -X POST \
      -d '{
        "name" : "Gaskets"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "option set" : {
            "id" : 3,
            "name" : "Gaskets"
      }
    }
    

    This endpoint creates a new option set.

    HTTP Request

    POST https://yourpim.com/api/v1/option_sets

    Update a Specific Option Set

    curl "https://yourpim.com/api/v1/option_sets/2" \
      -X PUT \
      -d '{
        "name":"Bikes"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "option set" : {
                "id": 2,
                "name':'Bikes"
      } 
    }
    

    This endpoint updates a specific option set.

    HTTP Request

    PUT https://yourpim.com/api/v1/option_sets/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the option set to update

    Delete a Specific Option Set

    curl "https://yourpim.com/api/v1/option_sets/2" \
      -X DELETE \
      -H "Authorization: Bearer {token}"
    

    The above command returns a JSON structured like this:

    {
      "message": "Deleted."
    }
    

    This endpoint deletes a specific option set.

    HTTP Request

    DELETE https://yourpim.com/api/v1/option_sets/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the option set to delete

    Option Set Options

    Option Set Option Properties

    Property Description
    id Jasper option set option ID
    option_id (integer) ID of the option
    option_set_id (integer) ID of the option set
    sort_order (integer) Sort order for the option within the option set

    Get All Option Set Options

    curl "https://yourpim.com/api/v1/option_sets/1/options" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "option_set_options" :
            [
              {
                "id": 1,
                "option_id": 1,
                "option_set_id": 1
              },
              {
                "id": 2,
                "option_id": 2,
                "option_set_id": 1
              }
            ]
    }
    

    This endpoint retrieves all option set options for a specific option set.

    HTTP Request

    GET https://yourpim.com/api/v1/option_sets/<OPTIONSETID>/options

    URL Parameters

    Parameter Description
    OPTIONSETID The ID of the option set whose options to retrieve

    Create/Update an Option Set Option

    curl "https://yourpim.com/api/v1/option_sets/2/options" \
      -X POST \
      -d '{
                "option_id" : 3,
                "sort_order" : 2
       }' \
      -H "Authorization: Bearer {token}"
    

    This endpoint creates a new option set option or updates an option set option.

    HTTP Request

    POST https://yourpim.com/api/v1/option_sets/<OPTIONSETID>/options

    URL Parameters

    Parameter Description
    OPTIONSETID The ID of the option set

    Delete a Specific Option Set Option

    curl "https://yourpim.com/api/v1/option_sets/2/options/1" \
      -X DELETE \
      -H "Authorization: Bearer {token}"
    

    The above command returns a JSON structured like this:

    {
      "message": "Deleted."
    }
    

    This endpoint deletes a specific option set option.

    HTTP Request

    DELETE https://yourpim.com/api/v1/option_sets/<OPTIONSETID>/options/<ID>

    URL Parameters

    Parameter Description
    ID The option ID to delete
    OPTIONSETID The ID of the option set whose option to delete

    Pages

    Page Properties

    Property Description
    id Jasper Page ID
    name Page name
    slug Page slug
    content HTML Content
    mobile_body Mobile optimized HTML content
    url Page URL
    has_mobile_version (boolean) The page has a mobile version
    is_customers_only (boolean) The page is restricted to logged in customers
    is_homepage (boolean) The page is a homepage
    is_visible (boolean) The page is visible
    seo_meta_desc Meta description
    seo_meta_keywords Meta keywords
    seo_meta_title Meta page title
    search_keywords Comma separated list of search keywords

    Get All Pages

    curl "https://yourpim.com/api/v1/pages" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "pages" :
            [
              {
                "id": 1,
                "name": "About Us",
                "url": "/about-us/"
                ...
              },
              {
                "id": 2,
                "name": "Contact Us",
                "url": "/contact-us/"
                ...
              }
            ]
    }
    

    This endpoint retrieves all pages.

    HTTP Request

    GET https://yourpim.com/api/v1/pages

    Get a Specific Page

    curl "https://yourpim.com/api/v1/pages/2" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "page" : {
            "id": 2,
            "name": "Contact Us",
            "url": "/contact-us/"
          ...
      }
    }
    

    This endpoint retrieves a specific page.

    HTTP Request

    GET https://yourpim.com/api/v1/pages/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the page to retrieve

    Create a Page

    curl "https://yourpim.com/api/v1/pages" \
      -X POST \
      -d '{
        "name":"Our History",
        "url":"/our-history/",
        "parent_id":"1"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "page" : {
          "id" : 3,
          "name" : "Our History",
          "url" : "/our-history/"
          ...
      }
    }
    

    This endpoint creates a new page.

    HTTP Request

    POST https://yourpim.com/api/v1/pages

    Update a Specific Page

    curl "https://yourpim.com/api/v1/pages/2" \
      -X PUT \
      -d '{
        "name":"Where We Are"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "page" : {
            "id": 2,
            "name": "Where We Are",
            "url": "/contact-us/"
          ...
      } 
    }
    

    This endpoint updates a specific page.

    HTTP Request

    PUT https://yourpim.com/api/v1/pages/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the page to update

    Page Assets

    Page Asset Properties

    Property Description
    id Jasper page asset ID
    page_id ID of the page to which the asset belongs
    uri URI
    alttext Image alternate text
    thumbnail (boolean) Whether the asset is the thumbnail

    Get All Page Assets

    curl "https://yourpim.com/api/v1/pages/1/assets" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "page_assets" :
            [
              {
                "id": 1,
                "page_id": 1
                "uri": "https://cdnpim.com/coolimage.png",
                "alttext": "Description of image",
                "thumbnail" : 1
              },
              {
                "id": 2,
                "page_id": 1
                "uri": "https://cdnpim.com/coolimage.png",
                "alttext": "Description of image",
                "thumbnail" : 0
              }
            ]
    }
    

    This endpoint retrieves all page assets for a specific page.

    HTTP Request

    GET https://yourpim.com/api/v1/pages/<PAGEID>/assets

    URL Parameters

    Parameter Description
    PAGEID The ID of the page whose assets to retrieve

    Get a Specific Page Asset

    curl "https://yourpim.com/api/v1/pages/2/assets/1" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "page_asset" : {
                "id": 1,
                "page_id": 2
                "uri": "https://cdnpim.com/coolimage.png",
                "alttext": "Description of image",
                "thumbnail" : 1
      }
    }
    

    This endpoint retrieves a specific page asset.

    HTTP Request

    GET https://yourpim.com/api/v1/pages/<PAGEID>/assets/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the page asset to retrieve
    PAGEID The ID of the page whose assets to retrieve

    Products

    Product Properties

    Property Description
    id Jasper Product ID
    name Name
    sku Sku (must be unique)
    product_url Product URL
    style_id Style ID
    brand_id Brand ID
    parent_id Parent product ID
    option_set_id Option set ID
    option_values (array) Required for variant child products
    is_bundle Product is the top of a bundle
    bundle_id Bundle that product belongs to
    category_ids (array) Category IDs
    children (array) Child product objects (READ ONLY)
    is_visible (boolean) Product is visible
    enabled (boolean) Product is enabled
    desc_short Master short description
    desc_long Master long description
    prices (array) Product price objects (READ ONLY)
    inventory (array) Product inventory objects (READ ONLY)

    Get All Products

    curl "https://yourpim.com/api/v1/products?page=1" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "products": [
        {
          "id": 1,
          "name": "Red T-Shirt",
          "sku": "RED1",
          ...
        },
        {
          "id": 2,
          "name": "Blue T-Shirt",
          "sku": "BLUE1",
          ...
        }
      ],
      "links": {
        "first": "https://yourpim.com/api/v1/products?page=1",
        "last": "https://yourpim.com/api/v1/products?page=6",
        "prev": null,
        "next": "https://yourpim.com/api/v1/products?page=2"
      },
      "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 6,
        "path": "https://yourpim.com/api/v1/products",
        "per_page": 25,
        "to": 25,
        "total": 127
      }
    }
    

    This endpoint show a collection of products (with attributes, categories, channels, product children and assets).

    The default is to list 25 products per page (but you can change it using the "limit" parameter in the URL).

    Also use the "page" parameter in the URL to navigate in the pagination of the product list.

    HTTP Request

    GET https://yourpim.com/api/v1/products?page=1&limit=50

    URL Parameters

    Parameter Description
    page The page of the products
    limit The limit of products to retrieve

    Get All Products by Version

    curl "https://yourpim.com/api/v1/products/version/1" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "products": [
        {
          "id": 1,
          "name": "Tshirt Rouge",
          "sku": "ts-rouge1",
          ...
        },
        {
          "id": 2,
          "name": "Tshirt Bleue",
          "sku": "ts-bleue1",
          ...
        }
      ],
      "links": {
        "first": "https://yourpim.com/api/v1/products/version/1?limit=25&page=1",
        "last": "https://yourpim.com/api/v1/products/version/1?limit=25&page=2",
        "prev": null,
        "next": "https://yourpim.com/api/v1/products/version/1?limit=25&page=2"
      },
      "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 2,
        "path": "https://yourpim.com/api/v1/products/version/1",
        "per_page": 25,
        "to": 25,
        "total": 50
      }
    }
    

    This endpoint shows a collection of versioned products with option of filtering out some products and/or adding some relations such as attributes, categories, product variant, assets, etc. to them.

    Refer to the URL Optional Parameters below to check all the possible filters and/or relations to the endpoint.

    HTTP Request

    GET https://yourpim.com/api/v1/products/version/<VERSION_ID>?status=enabled&with=variants,assets,categories&limit=25&page=1

    URL Required Parameters

    Parameter Description
    VERSION_ID The ID of the version

    URL Optional Parameters

    Parameter Description
    sku Filters the result by product SKU.
    type Filters the type of products to be retrieved (allowed values: all, parents. default: parents).
    status Filters the type of products to be retrieved (allowed values: all, enabled, disabled. default: all).
    with Comma separated relation to be added to the product (allowed values: variants,variants-attributes,variants-prices,variants-inventory,attributes,active-prices,all-prices,inventory,generic-entities,related-products,tags,assets,categories)
    limit Limit the quantity of products at each request (default: 25).
    page Navigate through the pagination of product list (default: 1).

    Get a Specific Product by ID

    curl "https://yourpim.com/api/v1/products/2" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product": {
        "id": 2,
        "name": "Blue T-Shirt",
        "sku": "TSHIRT-BLUE-2",
        "product_url": "tshirt-blue",
        "page_title": "Product page - Blue T-shirt",
        "enabled": 1,
        "is_visible": 1,
        ...
      }
    }
    

    This endpoint retrieves a specific product.

    HTTP Request

    GET https://yourpim.com/api/v1/products/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the product to retrieve

    Get a Version of a Product

    curl "https://yourpim.com/api/v1/products/2/version/2" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product": {
        "id": 2,
        "name": "T-shirt bleu",
        "sku": "BLEU-TSHIRT-2",
        "product_url": "tshirt-bleu",
        "page_title": "Fiche produit - t-shirt bleu",
        "enabled": 1,
        "is_visible": 1,
        ...
      }
    }
    

    This endpoint retrieves a specific version of product.

    HTTP Request

    GET https://yourpim.com/api/v1/products/<ID>/version/<VERSION_ID>

    URL Parameters

    Parameter Description
    ID The ID of the product to retrieve
    VERSION_ID The ID of the version

    Get a Specific Product by SKU

    curl "https://yourpim.com/api/v1/products/sku/12345" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product": {
        "id": 2,
        "name": "Blue T-Shirt",
        "sku": "12345",
        "product_url": "tshirt-blue",
        "page_title": "Product page - Blue T-shirt",
        "enabled": 1,
        "is_visible": 1,
        ...
      }
    }
    

    This endpoint retrieves a specific product.

    HTTP Request

    GET https://yourpim.com/api/v1/products/sku/<SKU>

    URL Parameters

    Parameter Description
    SKU The SKU of the product to retrieve

    Create a Product

    curl "https://yourpim.com/api/v1/products" \
      -X POST \
      -d '{
        "name":"Green T-Shirt",
        "sku":"GREEN1",
        "enabled": 1,
        "is_visible": 1
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product" : {
          "id" : 3,
          "name" : "Green T-Shirt",
          "sku" : "GREEN-1",
          "enabled": 1,
          "is_visible": 1,
          ...
      }
    }
    

    This endpoint creates a new product.

    HTTP Request

    POST https://yourpim.com/api/v1/products

    Create a Child Product

    curl "https://yourpim.com/api/v1/products" \
      -X POST \
      -d '{
        "name": "T-Shirt",
        "sku": "GREEN1",
        "enabled": 1,
        "is_visible": 1,
        "option_values": [
            {
                "option_id": 1,
                "option_value_id": 2
            },
            {
                "option_id": 2,
                "option_value_id": 5
            }
        ],
        "parent_id": 5
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product" : {
            "id" : 4,
            "name":"T-Shirt",
            "sku":"GREEN1",
            "parent_id": 5,
            "updated_at": "2020-03-12",
            "enabled": 1,
            "is_visible": 1,
            "is_bundle": 0,
            "featured": 0,
            "shipping_weight": "0.00",
            "shipping_override": "inherit",
            "special_order": 0,
            "generic_entities": [],
            "product_attributes": [],
            "related_products": [],
            "categories": [],
            "channels": [],
            "barcodes": [],
            "prices": [],
            "inventory": [],
            "children": []
      }
    }
    

    This endpoint creates a new product.

    HTTP Request

    POST https://yourpim.com/api/v1/products

    Update a Specific Product

    curl "https://yourpim.com/api/v1/products/2" \
      -X PUT \
      -d '{
        "name":"Bluish T-Shirt",
        "sku":"BLUE1",
        "product_url":"bluish-tshirt"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product" : {
                "id": 2,
                "name": "Bluish T-Shirt",
                "sku": "BLUE1",
                "product_url": "bluish-tshirt",
                "enabled": 1,
                "is_visible": 1,
                ...
      }
    }
    

    This endpoint updates a specific product.

    HTTP Request

    PUT https://yourpim.com/api/v1/products/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the product to update

    Update a Specific Version of a Product

    curl "https://yourpim.com/api/v1/products/2/version/2" \
      -X PUT \
      -d '{
        "name":"Bleu T-Shirt",
        "sku":"BLEU-TSHIRT-2",
        "product_url":"bleu-tshirt"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product" : {
                "id": 2,
                "name": "Bleu T-Shirt",
                "sku": "BLEU-TSHIRT-2",
                "product_url": "bleu-tshirt",
                "enabled": 1,
                "is_visible": 1,
                ...
      }
    }
    

    This endpoint updates a specific version of a product. If the product version does not exist (and the version is set up in your PIM), it creates a new product version.

    HTTP Request

    PUT https://yourpim.com/api/v1/products/<ID>/version/<VERSION_ID>

    URL Parameters

    Parameter Description
    ID The ID of the product to update
    VERSION_ID The ID of the version

    Delete a Specific Product

    curl "https://yourpim.com/api/v1/products/2" \
      -X DELETE \
      -H "Authorization: Bearer {token}"
    

    This endpoint deletes a specific product.

    HTTP Request

    DELETE https://yourpim.com/api/v1/products/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the product to delete

    Delete a Specific Version of a Product

    curl "https://yourpim.com/api/v1/products/2/version/2" \
      -X DELETE \
      -H "Authorization: Bearer {token}"
    

    This endpoint deletes a specific version of a product.

    HTTP Request

    DELETE https://yourpim.com/api/v1/products/<ID>/version/<VERSION_ID>

    URL Parameters

    Parameter Description
    ID The ID of the product to delete
    VERSION_ID The ID of the version

    Remove Child Product From Parent

    curl "https://yourpim.com/api/v1/products/123/remove-from-parent" \
      -X DELETE \
      -H "Authorization: Bearer {token}"
    

    This endpoint remove a given child product from it's parent product. The child product will be unpublished as a result of this operation.

    HTTP Request

    DELETE https://yourpim.com/api/v1/products/<ID>/remove-from-parent

    URL Parameters

    Parameter Description
    ID The ID of the child product

    Product Assets

    Product Asset Properties

    Property Description
    id Jasper Product asset ID
    product_id ID of the product to which the asset belongs
    uri URI
    sort_order Sort order
    private (boolean)
    alttext Image alternate text
    name Name of the Image
    desc Description of the Image
    type Type of the Image
    thumbnail (boolean) Whether the asset is the thumbnail

    Get All Product Assets

    curl "https://yourpim.com/api/v1/products/1/assets" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "product_assets" :
            [
              {
                "id": 1,
                "product_id": 1
                "uri": "https://cdnpim.com/coolimage.png",
                "alttext": "Image alternate text",
                "name": "Name of the Image",
                "desc": "Description of the Image",
                "type": "Type of the Image",
                "thumbnail" : 1, 
                ...
              },
              {
                "id": 2,
                "product_id": 1
                "uri": "https://cdnpim.com/coolimage.png",
                "alttext": "Image alternate text",
                "name": "Name of the Image",
                "desc": "Description of the Image",
                "type": "Type of the Image",
                "thumbnail" : 0, 
                ...
              }
            ]
    }
    

    This endpoint retrieves all product assets for a specific product.

    HTTP Request

    GET https://yourpim.com/api/v1/products/<PRODUCT_ID>/assets

    URL Parameters

    Parameter Description
    PRODUCT_ID The ID of the product whose assets to retrieve

    Get a Specific Product Asset

    curl "https://yourpim.com/api/v1/products/2/assets/1" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product_asset" : {
                "id": 1,
                "product_id": 2,
                "uri": "https://cdnpim.com/coolimage.png",
                "alttext": "Image alternate text",
                "name": "Name of the Image",
                "desc": "Description of the Image",
                "type": "Type of the Image",
                "thumbnail" : 1, 
                ...
      }
    }
    

    This endpoint retrieves a specific product asset.

    HTTP Request

    GET https://yourpim.com/api/v1/products/<PRODUCT_ID>/assets/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the product asset to retrieve
    PRODUCT_ID The ID of the product whose assets to retrieve

    Create a Product Asset

    curl "https://yourpim.com/api/v1/products/2/assets" \
      -X POST \
      -d '{
                "image_url": "https://cdnpim.com/coolimage.png",
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product_asset" : {
                "id": 42,
                "product_id": 2,
                "uri": "https://cdnpim.com/coolimage.png",
                "alttext": "Image alternate text",
                "name": "Name of the Image",
                "desc": "Description of the Image",
                "type": "Type of the Image",
                "thumbnail" : 1,
                ...
      }
    }
    

    This endpoint creates a new product asset.

    HTTP Request

    POST https://yourpim.com/api/v1/products/<PRODUCT_ID>/assets

    URL Parameters

    Parameter Description
    PRODUCT_ID The ID of the product

    Update a Specific Product Asset

    curl "https://yourpim.com/api/v1/products/2/assets/1" \
      -X PUT \
      -d '{
            "image_url": "https://cdnpim.com/coolimage.png",
            "alttext": "Description of image",
            "name": "Name of the Image",
            "desc": "Description of the Image",
            "type": "Type of the Image",
            "thumbnail" : 1
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product_asset" : {
            "id": 1
            "product_id" : 2,
            "uri": "https://cdnpim.com/coolimage.png",
            "alttext": "Image alternate text",
            "name": "Name of the Image",
            "desc": "Description of the Image",
            "type": "Type of the Image",
            "thumbnail" : 1, 
            ...
      } 
    }
    

    This endpoint updates a specific product asset.

    HTTP Request

    PUT https://yourpim.com/api/v1/products/<PRODUCT_ID>/assets/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the product asset to update
    PRODUCT_ID The ID of the product whose asset to update

    Delete a Specific Product Asset

    curl "https://yourpim.com/api/v1/products/2/assets/1" \
      -X DELETE \
      -H "Authorization: Bearer {token}"
    

    This endpoint deletes a specific product asset.

    HTTP Request

    DELETE https://yourpim.com/api/v1/products/<PRODUCT_ID>/assets/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the product asset to delete
    PRODUCT_ID The ID of the product whose asset to delete

    Product Barcodes

    Product Barcodes Properties

    Property Description
    id Product barcode ID
    product_id ID of the product to which the barcode belongs
    type The type of this barcode (EAN, UPC-A, GTIN-13, ITF-14, Custom)
    barcode The barcode number
    created_at Datetime of the creation
    updated_at Datetime of the last update

    Get All Product Barcodes

    curl "https://yourpim.com/api/v1/products/1/barcodes" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "barcodes" :
            [
              {
                "id": 1,
                "product_id": 1,
                "type": "UPC-A",
                "barcode": "123456789000",
                "created_at": "2022-11-11T19:58:12+00:00",
                "updated_at": "2022-11-11T19:59:55+00:00"
              },
              {
                "id": 2,
                "product_id": 1,
                "type": "ITF-14",
                "barcode": "01234567891234",
                "created_at": "2022-11-11T19:58:12+00:00",
                "updated_at": "2022-11-11T19:58:12+00:00"
              }
            ]
    }
    

    This endpoint retrieves all product barcodes for a specific product.

    HTTP Request

    GET https://yourpim.com/api/v1/products/<PRODUCTID>/barcodes

    URL Parameters

    Parameter Description
    PRODUCTID The ID of the product whose barcodes to retrieve

    Create a Product Barcode

    curl "https://yourpim.com/api/v1/products/1/barcodes" \
      -X POST \
      -d '{
                "type": "UPC-A",
                "barcode": "123456789000"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "id": 1,
        "product_id": 1,
        "type": "UPC-A",
        "barcode": "123456789000",
        "created_at": "2022-11-11T19:58:12+00:00",
        "updated_at": "2022-11-11T19:59:55+00:00"
    }
    

    This endpoint creates a new product barcode.

    Note: For "UPC-A" we expect 12 digits. "ITF-14": 14 digits. "GTIN-13": 13 digits. "EAN": 13 digits. "Custom": any number of digits.

    HTTP Request

    POST https://yourpim.com/api/v1/products/<PRODUCTID>/barcodes

    URL Parameters

    Parameter Description
    PRODUCTID The ID of the product

    Update a Product Barcode

    curl "https://yourpim.com/api/v1/products/1/barcodes/1" \
      -X PUT \
      -d '{
                "type": "UPC-A",
                "barcode": "123456789123"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "id": 1,
        "product_id": 1,
        "type": "UPC-A",
        "barcode": "123456789123",
        "created_at": "2022-11-11T19:58:12+00:00",
        "updated_at": "2022-11-12T12:30:38+00:00"
    }
    

    This endpoint updates a given product barcode.

    Note: For "UPC-A" we expect 12 digits. "ITF-14": 14 digits. "GTIN-13": 13 digits. "EAN": 13 digits. "Custom": any number of digits.

    HTTP Request

    PUT https://yourpim.com/api/v1/products/<PRODUCTID>/barcodes/<BARCODEID>

    URL Parameters

    Parameter Description
    PRODUCTID The ID of the product
    BARCODEID The ID of the product barcode

    Delete a Product Barcode

    curl "https://yourpim.com/api/v1/products/1/barcodes/1" \
      -X DELETE \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "id": 1,
        "product_id": 1,
        "type": "UPC-A",
        "barcode": "123456789123",
        "created_at": "2022-11-11T19:58:12+00:00",
        "updated_at": "2022-11-12T12:30:38+00:00"
    }
    

    This endpoint deletes a given product barcode.

    HTTP Request

    DELETE https://yourpim.com/api/v1/products/<PRODUCTID>/barcodes/<BARCODEID>

    URL Parameters

    Parameter Description
    PRODUCTID The ID of the product
    BARCODEID The ID of the product barcode

    Upsert Product Barcodes (with delete)

    curl "https://yourpim.com/api/v1/products/1/barcodes/1" \
      -X PUT \
      -d '{
                "barcodes"" [
                    {
                        "type": "UPC-A",
                        "barcode": "123456789123"
                    },
                    {
                        "type": "Custom",
                        "barcode": "0000444498765321"
                    }
                ]
    
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "barcodes": [
            {
                "id": 1,
                "product_id": 1,
                "type": "UPC-A",
                "barcode": "123456789123",
                "created_at": "2022-11-11T19:58:12+00:00",
                "updated_at": "2022-11-12T12:30:38+00:00"
            },
            {
                "id": 3,
                "product_id": 1,
                "type": "Custom",
                "barcode": "0000444498765321",
                "created_at": "2022-11-12T12:30:38+00:00",
                "updated_at": "2022-11-12T12:30:38+00:00"
            },
        ]
    
    }
    

    This endpoint upsert (update and/or insert) a list of given product barcodes. If a product has barcodes that were not touched by this operation then those are going to be DELETED. Only the barcodes present on the request payload will remain on the product.

    Note: For "UPC-A" we expect 12 digits. "ITF-14": 14 digits. "GTIN-13": 13 digits. "EAN": 13 digits. "Custom": any number of digits.

    HTTP Request

    PUT https://yourpim.com/api/v1/products/<PRODUCTID>/barcodes/upsert

    URL Parameters

    Parameter Description
    PRODUCTID The ID of the product

    Upsert Product Barcodes (without delete)

    curl "https://yourpim.com/api/v1/products/1/barcodes/1" \
      -X POST \
      -d '{
                "barcodes"" [
                    {
                        "type": "UPC-A",
                        "barcode": "123456789123"
                    },
                    {
                        "type": "Custom",
                        "barcode": "0000444498765321"
                    }
                ]
    
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "barcodes": [
            {
                "id": 1,
                "product_id": 1,
                "type": "UPC-A",
                "barcode": "123456789123",
                "created_at": "2022-11-11T19:58:12+00:00",
                "updated_at": "2022-11-12T12:30:38+00:00"
            },
            {
                "id": 2,
                "product_id": 1,
                "type": "ITF-14",
                "barcode": "01234567891234",
                "created_at": "2022-11-11T19:58:12+00:00",
                "updated_at": "2022-11-11T19:58:12+00:00"
            },
            {
                "id": 3,
                "product_id": 1,
                "type": "Custom",
                "barcode": "0000444498765321",
                "created_at": "2022-11-12T12:30:38+00:00",
                "updated_at": "2022-11-12T12:30:38+00:00"
            },
        ]
    
    }
    

    This endpoint upsert (update and/or insert) a list of given product barcodes. No barcode will be deleted with this endpoint.

    Note: For "UPC-A" we expect 12 digits. "ITF-14": 14 digits. "GTIN-13": 13 digits. "EAN": 13 digits. "Custom": any number of digits.

    HTTP Request

    POST https://yourpim.com/api/v1/products/<PRODUCTID>/barcodes/upsert

    URL Parameters

    Parameter Description
    PRODUCTID The ID of the product

    Product Categories

    Product Categories Properties

    Property Description
    id Jasper Product category ID
    parent_id Category parent ID
    name Category name
    desc Category description
    slug Category slug
    attribute_sets (array) Attribute set IDs for the category
    is_visible (boolean) Whether to display the category
    seo_meta_desc Meta description
    seo_meta_keywords Meta keywords
    seo_meta_title Meta page title
    search_keywords Comma separated list of search keywords
    created_at Time the category was created (read only)
    updated_at Time the category was updated (read only)

    Assign a Category to a Product

    curl "https://yourpim.com/api/v1/products/1/categories" \
      -X POST \
      -d '{
        "category_id": "1"
      }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "product_categories": {
            "id": 1,
            "parent_id": 0,
            "name": "Clothes",
            "desc": null,
            "slug": "root",
            ...
        }
    }
    

    This endpoint assign a category to a product.

    HTTP Request

    POST https://yourpim.com/api/v1/products/PRODUCT_ID/categories

    URL Parameters

    Parameter Description
    PRODUCT_ID The ID of the product

    Product Prices

    Product Price Properties

    Property Description
    id Jasper Product price ID
    product_id ID of the product to which the price belongs
    msrp MSRP
    map Minimum Advertised Price
    cost Cost Price
    sell_price Selling price
    from (datetime) Price start date
    to (datetime) Price end date
    currency_id Price currency ID
    tax_class_id Tax class ID
    author Price author
    booktype Pricebook Type
    batch_id Batch Import ID
    sell_price_reason Price over-ride reason
    base Price base (required)

    Get All Product Prices

    curl "https://yourpim.com/api/v1/products/1/prices" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "product_prices" :
            [
              {
                "id": 1,
                "product_id": 1,
                "msrp": 250.00,
                "cost": 73.00,
                "base": "US" 
                ...
              },
              {
                "id": 2,
                "product_id": 2,
                "msrp": 254.00,
                "cost": 53.00,
                "base": "US" 
    
                ...
              }
            ]
    }
    

    This endpoint retrieves all product prices for a specific product.

    HTTP Request

    GET https://yourpim.com/api/v1/products/<PRODUCTID>/prices

    URL Parameters

    Parameter Description
    PRODUCTID The ID of the product whose prices to retrieve

    Get a Specific Product Price

    curl "https://yourpim.com/api/v1/products/2/prices/1" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product_price" : {
                "id": 2,
                "product_id": 2
                "msrp": 254.00,
                "cost": 53.00,
                "base": "US"  
                ...
      }
    }
    

    This endpoint retrieves a specific product price.

    HTTP Request

    GET https://yourpim.com/api/v1/products/<PRODUCTID>/prices/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the product price to retrieve
    PRODUCTID The ID of the product whose prices to retrieve

    Create a Product Price

    curl "https://yourpim.com/api/v1/products/2/prices" \
      -X POST \
      -d '{
                "msrp": 75.99,
                "cost" : 10.00,
                "base" : "US"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product_price" : {
                "id": 42,
                "product_id": 3,
                "msrp": 75.99,
                "cost" : 10.00,
                "base" : "US"
                ...
      }
    }
    

    This endpoint creates a new product price.

    Note: when creating a price, you must have at least one value for msrp, cost, map or sell_price

    HTTP Request

    POST https://yourpim.com/api/v1/products/<PRODUCTID>/prices

    URL Parameters

    Parameter Description
    PRODUCTID The ID of the product

    Delete a Specific Product Price

    The API doesn't allow deletion of product prices. Contact support if necessary

    Product Inventory

    Product Inventory Properties

    Property Description
    id Jasper Product inventory ID
    product_id ID of the product to which the inventory belongs
    site Site of inventory
    bin Bin
    location Location
    type Inventory type
    count_on_hand Count on hand
    count_on_hold Count on hold
    source Inventory source
    batch_id Batch ID from inventory loading

    Get All Product Inventories

    curl "https://yourpim.com/api/v1/products/1/inventory" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "product_inventory" :
            [
              {
                "id": 1,
                "product_id": 1
                "count_on_hand" : 42
                ...
              },
              {
                "id": 2,
                "product_id": 2
                "count_on_hand" : 52
                ...
              }
            ]
    }
    

    This endpoint retrieves all product inventory for a specific product.

    HTTP Request

    GET https://yourpim.com/api/v1/products/<PRODUCTID>/inventory

    URL Parameters

    Parameter Description
    PRODUCTID The ID of the product whose inventory to retrieve

    Get a Specific Product Inventory

    curl "https://yourpim.com/api/v1/products/2/inventory/1" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product_inventory" : {
                "id": 2,
                "product_id": 2
                "count_on_hand" : 52
                ...
      }
    }
    

    This endpoint retrieves a specific product inventory.

    HTTP Request

    GET https://yourpim.com/api/v1/products/<PRODUCTID>/inventory/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the product inventory to retrieve
    PRODUCTID The ID of the product whose inventory to retrieve

    Create a Product Inventory

    curl "https://yourpim.com/api/v1/products/2/inventory" \
      -X POST \
      -d '{
                "product_id": 3,
                "count_on_hand": 75
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product_inventory" : {
                "id": 42,
                "product_id": 3,
                "count_on_hand": 75
                ...
      }
    }
    

    This endpoint creates a new product inventory.

    HTTP Request

    POST https://yourpim.com/api/v1/products/<PRODUCTID>/inventory

    URL Parameters

    Parameter Description
    PRODUCTID The ID of the product

    Update a Specific Product Inventory

    curl "https://yourpim.com/api/v1/products/2/inventory/1" \
      -X PUT \
      -d '{
            "count_on_hand": 22
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product_inventory" : {
            "id": 1
            "product_id" : 2,
            "count_on_hand" : 22
            ...
      } 
    }
    

    This endpoint updates a specific product inventory.

    HTTP Request

    PUT https://yourpim.com/api/v1/products/<PRODUCTID>/inventory/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the product inventory to update
    PRODUCTID The ID of the product whose inventory to update

    Delete a Specific Product Inventory

    curl "https://yourpim.com/api/v1/products/2/inventory/1" \
      -X DELETE \
      -H "Authorization: Bearer {token}"
    

    This endpoint deletes a specific product inventory.

    HTTP Request

    DELETE https://yourpim.com/api/v1/products/<PRODUCTID>/inventory/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the product inventory to delete
    PRODUCTID The ID of the product whose inventory to delete

    Product Attributes

    Product Attribute Properties

    Property Description
    id Jasper Attribute ID
    name Attribute name (must be unique)
    slug Slugified Attribute name
    user_defined_key User Key
    type (enum) Attribute type (allowed values: selectbox, date, datetime, textarea, multiselect, text)
    values The Attributes Value

    Get All Product Attributes

    curl "https://yourpim.com/api/v1/products/1/attributes" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product_attributes" : [
        {
          "attribute_id" : 1,
          "name" : "Attribute One",
          "slug" : "attribute-one",
          "user_defined_key" : "{}",
          "type" : "text",
          "values" : []
        },
        {
          "attribute_id" : 2,
          "name" : "Attribute Two",
          "slug" : "attribute-two",
          "user_defined_key" : "{}",
          "type" : "selectbox",
          "values" : [
            {
              "id" : 1,
              "version_id" : 0,
              "value" : "Selected"
            }
          ]
        }
      ]
    }
    

    This endpoint retrieves all product attributes.

    HTTP Request

    GET https://yourpim.com/api/v1/products/<ID>/attributes

    URL Parameters

    Parameter Description
    ID The ID of the product related with the attributes to retrieve

    Get A Product Attribute

    curl "https://yourpim.com/api/v1/products/1/attributes/1" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "products_attributes" : [
        {
          "attribute_id" : 1,
          "name" : "Attribute One",
          "slug" : "attribute-one",
          "user_defined_key" : "{}",
          "type" : "text",
          "values" : [
            {
              "id" : 1,
              "version_id" : 0,
              "value" : "Text"
            }
          ]
        }
      ]
    }
    

    This endpoint retrieves a specific product attribute.

    HTTP Request

    GET https://yourpim.com/api/v1/products/<ID>/attributes/<AttributeID>

    URL Parameters

    Parameter Description
    ID The ID of the product related with the specific attribute to retrieve
    AttributeID The ID of the attribute to retrieve

    Create a Product Attribute

    curl : "https://yourpim.com/api/v1/products/1/attributes" \
      -X POST \
      -d '{
        "attribute_id" : 1,
        "version_id" : 0,
        "values" : [
          {
            "value" : "Text"
          }
        ]
      }'
    

    The above command returns JSON structured like this:

    {
      "products_attributes" : {
        "attribute_id" : 1,
        "name" : "Attribute One",
        "slug" : "attribute-one",
        "user_defined_key" : "{}",
        "type" : "text",
        "values" : [
          {
            "id" : 1,
            "version_id" : 0,
            "value" : "Text"
          },
          {
            "id" : 2,
            "version_id" : 1,
            "value" : "Texte"
          }
        ]
      }
    }
    

    This endpoint creates a specific Product Attribute.

    HTTP Request

    POST https://yourpim.com/api/v1/products/<ID>/attributes

    URL Parameters

    Parameter Description
    ID The ID of the product

    Update many Product Attributes

    curl "https://yourpim.com/api/v1/products/1/attributes" \
      -X PUT \
      -d '[
      {
          "attribute_id":1,
          "version_id":0,
          "values":[
             {
                "value":"No"
             }
          ]
       },
       {
          "attribute_id":3,
          "version_id":0,
          "values":[
             {
                "value":"Yes"
             }
          ]
       }
    ]'
    

    The above command returns JSON structured like this:

    {
      "products_attributes": [
        {
          "attribute_id": 1,
          "name": "Attribute One",
          "slug": "attribute-one",
          "user_defined_key": null,
          "type": "text",
          "values": [
            {
              "id": 998,
              "version_id": 0,
              "value": "No"
            }
          ]
        },
        {
          "attribute_id": 3,
          "name": "Attribute Three",
          "slug": "attribute-three",
          "user_defined_key": null,
          "type": "text",
          "values": [
            {
              "id": 999,
              "version_id": 0,
              "value": "Yes"
            }
          ]
        }
      ]
    }
    

    This endpoint update many attributes of a product.

    HTTP Request

    PUT https://yourpim.com/api/v1/products/<ID>/attributes

    URL Parameters

    Parameter Description
    ID The ID of the product

    Update a Specific Product Attribute

    curl "https://yourpim.com/api/v1/products/1/attributes/1/values/1" \
    -X PUT \
      -d '{
        "attribute_id" : 1,
        "version_id" : 1,
        "values" : [
          {
            "value" : "Text Update"
          }
        ]
      }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product_attributes" : {
        "attribute_id" : 1,
        "name" : "Attribute One",
        "slug" : "attribute-one",
        "user_defined_key" : "{}",
        "type" : "text",
        "values" : [
          {
            "id" : 1,
            "version_id" : 0,
            "value" : "Text"
          },
          {
            "id" : 2,
            "version_id" : 1,
            "value" : "Texte"
          }
        ]
      }
    }
    

    This endpoint updates a specific product attribute value.

    HTTP Request

    PUT https://yourpim.com/api/v1/products/<ID>'/attributes/<AttributeID>/values/AttributeValueID>

    URL Parameters

    Parameter Description
    ID The ID of the product
    AttributeID The ID of the attribute
    AttributeValueID The ID of the attribute value to update

    Delete a Specific Attribute Value

    curl "https://yourpim.com/api/v1/products/1/attributes/1/values/1" \
      -X DELETE \
      -H "Authorization: Bearer {token}"
    

    This endpoint deletes a specific product attribute value.

    HTTP Request

    DELETE https://yourpim.com/api/v1/products/<ID>/attributes/<AttributeID>/values/<AttributeValueID>

    URL Parameters

    Parameter Description
    ID The ID of the product
    AttributeID The ID of the attribute
    AttributeValueID The id of the attribute value to delete

    Product Assign Attribute

    curl "https://yourpim.com/api/v1/products/1/assigned-attributes" \ 
      -X POST \ 
      -d '{
        "attribute_id" : 1
      }'
      -H "Authorization: Bearer {token}"
    

    This endpoint assigns a specific attribute to a product.

    HTTP Request

    POST https://yourpim.com/api/v1/products/<ID>/assigned-attributes

    URL Parameters

    Parameter Description
    ID The ID of the product

    Product Assign Attribute Set

    curl "https://yourpim.com/api/v1/products/1/assigned-attribute-sets" \
      -X POST \
      -d '{
        "attribute_set_id" : 1
      }'
      -H "Authorization: Bearer {token}"
    

    This endpoint assigns a specific attribute set to a product.

    HTTP Request

    POST https://yourpim.com/api/v1/products/<ID>/assigned-attribute-sets

    URL Paramters

    Parameter Description
    ID The ID of the product

    Product Channels

    Update or Create Web ID

    curl "https://yourpim.com/api/v1/products/680/channel/2" \  //EDIT
      -X POST \
      -d '{
            "web_id": 1
       }' \
      -H "Authorization: Bearer {token}"
    

    This endpoint updates or creates a web ID in product_channels.

    HTTP Request

    POST https://yourpim.com/api/v1/products/<PRODUCTID>/channel/<CHANNELID>

    URL Parameters

    Parameter Description
    PRODUCTID The ID of the product.
    CHANNELID The ID of the channel.

    Product Relation Types

    Product Relation Type Properties

    Property Description
    id Jasper Product Relation Type ID
    name Product Relation Type name
    description Product Relation Type description
    child_label How the relation is labeled when saw from the products assigned in the relation. Example: Parent, Is a part of
    parent_label How the relation is labeled when saw from the product where the related are being assigned. Example: Children, Parts
    relationship_cardinality Controls how products can be assigned to a relation in different products
    label grouping label for product relation type

    Get All Product Relation Types

    curl "https://yourpim.com/api/v1/product-relation-types" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "product_relation_types" :
            [
              {
                  "id": 1,
                  "name": "Footwear",
                  "description": "Related footwear",
                  "child_label": 2,
                  "parent_label": null,
                  "relationship_cardinality": "many-to-many",
                  "created_at": null,
                  "updated_at": null,
                  "label": "shoes",
                  "deleted_at": null
              },
              {
                  "id": 2,
                  "name": "Athletic footwear",
                  "description": "Running and sports shoes",
                  "child_label": null,
                  "parent_label": 1,
                  "relationship_cardinality": "one-to-many",
                  "created_at": null,
                  "updated_at": null,
                  "label": "shoes",
                  "deleted_at": null
              }
            ]
    }
    

    This endpoint retrieves all product relation types.

    HTTP Request

    GET https://yourpim.com/api/v1/product-relation-types

    Get a Specific Product Relation Type

    curl "https://yourpim.com/api/v1/product-relation-types/1" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product_relation_type" : {
                     "id": 1,
                     "name": "Footwear",
                     "description": "Related footwear",
                     "child_label": 2,
                     "parent_label": null,
                     "relationship_cardinality": "many-to-many",
                     "created_at": null,
                     "updated_at": null,
                     "label": "shoes",
                     "deleted_at": null
          }
    }
    

    This endpoint retrieves a specific product relation type.

    HTTP Request

    GET https://yourpim.com/api/v1/product-relation-types/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the product relation type to retrieve

    Create a Product Relation Type

    curl "https://yourpim.com/api/v1/product-relation-types" \
      -X POST \
      -d '{
            "name": "Jackets"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "product_relation_type": {
            "name": "Jackets",
            "updated_at": 2019-06-10 20:40:07,
            "created_at": 2019-06-10 20:40:07,
            "id": 3
        }
    }
    

    This endpoint creates a new product relation type.

    HTTP Request

    POST https://yourpim.com/api/v1/product-relation-types

    Update a Specific Product Relation Type

    curl "https://yourpim.com/api/v1/product-relation-types/1" \
      -X PUT \
      -d '{
            "name":"Shoes"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product_relation_type" : {
                     "id": 1,
                     "name": "Shoes",
                     "description": "Related footwear",
                     "child_label": 2,
                     "parent_label": null,
                     "relationship_cardinality": "many-to-many",
                     "created_at": null,
                     "updated_at": null,
                     "label": "shoes",
                     "deleted_at": null
          }
    }
    

    This endpoint updates a specific product relation type.

    HTTP Request

    PUT https://yourpim.com/api/v1/product-relation-types/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the product relation type to update

    Delete a Specific Product Relation Type

    curl "https://yourpim.com/api/v1/product-relation-types/1" \
      -X DELETE \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "message": "Deleted."
    }
    

    This endpoint deletes a specific product relation type.

    HTTP Request

    DELETE https://yourpim.com/api/v1/product-relation-types/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the product relation type to delete

    Product Relations

    Get All Product Relations From a Single Product

    curl "https://yourpim.com/api/v1/products/1/relations" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product_relations" : {
          "Related products" : [
              {
                  "id" : 2,
                  "name" : "Blue T-Shirt",
                  "sku" : "BLUE1",
                  ...
              },
              {
                  "id" : 3,
                  "name" : "Red T-Shirt",
                  "sku" : "RED1",
                  ...
              },
              {
                  "id" : 4,
                  "name" : "Navy Blue T-Shirt",
                  "sku" : "BLUE2",
                  ...
              }
          ]
      }
    }
    

    This endpoint retrieves all relations to a single product.

    HTTP Request

    GET https://yourpim.com/api/v1/products/<ID>/relations

    URL Parameters

    Parameter Description
    ID The ID of the product from which you are retrieving relations

    Get Product Relations From a Product by Relation Type

    curl "https://yourpim.com/api/v1/products/1/relations/type/1" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product_relations" : {
          "Related products" : [
              {
                  "id" : 2,
                  "name" : "Blue T-Shirt",
                  "sku" : "BLUE1",
                  ...
              },
              {
                  "id" : 4,
                  "name" : "Navy Blue T-Shirt",
                  "sku" : "BLUE2",
                  ...
              }
          ]
      }
    }
    

    This endpoint retrieves relations to a product for a single relation type.

    HTTP Request

    GET https://yourpim.com/api/v1/products/<PRODUCT-ID>/relations/type/<RELATION-ID>

    URL Parameters

    Parameter Description
    PRODUCT-ID The ID of the product from which you are retrieving relations
    RELATION-ID The ID of the relation type from which you are retrieving relations

    Create Product Relation

    curl "https://yourpim.com/api/v1/products/1/relations/5/type/1" \
      -X POST \
      -d '{}' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product_relations" : {
          "Related products" : [
              {
                  "id" : 2,
                  "name" : "Blue T-Shirt",
                  "sku" : "BLUE1",
                  ...
              },
              {
                  "id" : 4,
                  "name" : "Navy Blue T-Shirt",
                  "sku" : "BLUE2",
                  ...
              },
              {
                  "id" : 5,
                  "name" : "Maroon Red T-Shirt",
                  "sku" : "RED2",
                  ...
              }
          ]
      }
    }
    

    This endpoint creates a product relation between two products on a single relation type.

    HTTP Request

    POST https://yourpim.com/api/v1/products/<PRODUCT-ID>/relations/<RELATED-PRODUCT-ID>/type/<RELATION-ID>

    URL Parameters

    Parameter Description
    PRODUCT-ID The ID of the product on which the relation is based
    RELATED-PRODUCT-ID The ID of the product to which the base product is being attached
    RELATION-ID The ID of the relation type to which the relation should belong

    Delete a Product Relation

    curl "https://yourpim.com/api/v1/products/1/relations/5/type/1" \
      -X DELETE \
      -H "Authorization: Bearer {token}"
    

    This endpoint deletes a specific product relation.

    HTTP Request

    DELETE https://yourpim.com/api/v1/products/<PRODUCT-ID>/relations/<RELATED-PRODUCT-ID>/type/<RELATION-ID>

    URL Parameters

    Parameter Description
    PRODUCT-ID The ID of the product on which the relation is based
    RELATED-PRODUCT-ID The ID of the product to which the base product is attached
    RELATION-ID The ID of the relation type to which the relation belongs

    Product Relation Attributes

    Get Product Relation Attributes From a Product by Relation and Relation Type

    curl "https://yourpim.com/api/v1/products/1/relations/2/type/1/attributes" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product_relation_attribute_values": [
        {
          "id": 2,
          "entity_id": 3,
          "attribute_id": 1,
          "value": "blue",
          ...
        },
        {
          "id": 4,
          "entity_id": 3,
          "attribute_id": 1,
          "value": "red",
          ...
        }
      ]
    }
    
    

    This endpoint retrieves relations to a product for a single relation type.

    HTTP Request

    GET https://yourpim.com/api/v1/products/<PRODUCT-ID>/relations/<RELATED-PRODUCT-ID>/type/<RELATION-ID>/attributes

    URL Parameters

    Parameter Description
    PRODUCT-ID The ID of the product from which you are retrieving relations
    RELATED-PRODUCT-ID The ID of the product to which the base product is being attached
    RELATION-ID The ID of the relation type to which the relation should belong

    Create or Update Product Relation Attributes

    curl "https://yourpim.com/api/v1/products/1/relations/5/type/1/attributes" \
      -X POST \
      -d '{}' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product_relation_attribute_values": [
        {
          "id": 2,
          "entity_id": 3,
          "attribute_id": 1,
          "value": "blue",
          ...
        },
        {
          "id": 4,
          "entity_id": 3,
          "attribute_id": 1,
          "value": "red",
          ...
        }
      ]
    }
    

    This endpoint creates or updates product relation attributes between two products on a single relation type.

    HTTP Request

    POST https://yourpim.com/api/v1/products/<PRODUCT-ID>/relations/<RELATED-PRODUCT-ID>/type/<RELATION-ID>/attributes

    URL Parameters

    Parameter Description
    PRODUCT-ID The ID of the product on which the relation is based
    RELATED-PRODUCT-ID The ID of the product to which the base product is being attached
    RELATION-ID The ID of the relation type to which the relation should belong

    Create or Update a Single Attribute of a Product Relation

    curl "https://yourpim.com/api/v1/products/1/relations/5/type/1/attribute/3" \
      -X POST \
      -d '{}' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product_relation_attribute_values": [
        {
          "id": 2,
          "entity_id": 3,
          "attribute_id": 1,
          "value": "blue",
          ...
        }
      ]
    }
    

    This endpoint creates or updates a single attribute of a product relation between two products on a single relation type.

    HTTP Request

    POST https://yourpim.com/api/v1/products/<PRODUCT-ID>/relations/<RELATED-PRODUCT-ID>/type/<RELATION-ID>/attribute/<ATTRIBUTE-ID>

    URL Parameters

    Parameter Description
    PRODUCT-ID The ID of the product on which the relation is based
    RELATED-PRODUCT-ID The ID of the product to which the base product is being attached
    RELATION-ID The ID of the relation type to which the relation should belong
    ATTRIBUTE-ID The ID of the attribute to create or update

    Delete a Product Relation Attribute

    curl "https://yourpim.com/api/v1/products/1/relations/5/type/1/attribute/3" \
      -X DELETE \
      -H "Authorization: Bearer {token}"
    

    This endpoint deletes a specific attribute of a product relation.

    HTTP Request

    DELETE https://yourpim.com/api/v1/products/<PRODUCT-ID>/relations/<RELATED-PRODUCT-ID>/type/<RELATION-ID>/attribute/<ATTRIBUTE-ID>

    URL Parameters

    Parameter Description
    PRODUCT-ID The ID of the product on which the relation is based
    RELATED-PRODUCT-ID The ID of the product to which the base product is attached
    RELATION-ID The ID of the relation type to which the relation belongs
    ATTRIBUTE-ID The ID of the attribute to delete

    Product Tags

    Get All Product Tags From a Single Product

    curl "https://yourpim.com/api/v1/products/1/tags/2" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product_id": 1,
      "2": [
        "tag_1",
        "tag_2",
        "tag_3"
      ]
    }
    
    curl "https://yourpim.com/api/v1/products/1/tags" \
      -H "Authorization: Bearer {token}"
    

    Without the specific version as a last parameter it will return all tags from all versions.

    {
      "product_id": 1,
      "0": [
        "tag_1",
        "tag_2",
        "tag_3"
      ],
      "1": [
        "tag_a",
        "tag_b",
        "tag_c"
      ],
      "2": [
        "tag_x",
        "tag_y",
        "tag_z"
      ]
    }
    

    This endpoint retrieves all tags to a single product.

    HTTP Request

    GET https://yourpim.com/api/v1/products/<ID>/tags/<VERSION-ID>

    URL Parameters

    Parameter Description
    ID The ID of the product from which you are retrieving tags
    VERSION-ID The ID of the version (optional)

    Modify Product Tags

    curl "https://yourpim.com/api/v1/products/2/tags/1" \
      -X PUT \
      -d '{
      "product_id": 2,
      "0": [
        "tag_1",
        "tag_2",
        "tag_3"
      ]
      }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product_id": 2,
      "1": [
        "tag_1",
        "tag_2",
        "tag_3"
      ]
    }
    

    This endpoint updates a specific product.

    HTTP Request

    PUT https://yourpim.com/api/v1/products/<ID>/tags/<VERSION-ID>

    URL Parameters

    Parameter Description
    ID The ID of the product to update
    VERSION-ID The version ID
    curl "https://yourpim.com/api/v1/products/1/tags" \
      -X POST \
      -d '{
      "product_id": 1,
      "0": [
        "tag_1",
        "tag_2",
        "tag_3"
      ],
      "1": [
        "tag_a",
        "tag_b",
        "tag_c"
      ],
      "2": [
        "tag_x",
        "tag_y",
        "tag_z"
      ]
    }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product_id": 1,
      "0": [
        "tag_1",
        "tag_2",
        "tag_3"
      ],
      "1": [
        "tag_a",
        "tag_b",
        "tag_c"
      ],
      "2": [
        "tag_x",
        "tag_y",
        "tag_z"
      ]
    }
    

    This endpoint update a products tags.

    HTTP Request

    POST https://yourpim.com/api/v1/products/<PRODUCT-ID>/tags/<VERSION-ID>

    URL Parameters

    Parameter Description
    PRODUCT-ID The ID of the product on which the relation is based
    VERSION-ID The ID of the version

    Templates

    Template Properties

    Property Description
    id Jasper Template ID
    name Template name
    slug Slug
    content Content

    Get All Templates

    curl "https://yourpim.com/api/v1/templates" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "templates" :
            [
              {
                "id": 1,
                "name": "Main",
                "slug": "main",
                ...
              },
              {
                "id": 2,
                "name": "Side",
                "slug": "side"
                ...
              }
            ]
    }
    

    This endpoint retrieves all templates.

    HTTP Request

    GET https://yourpim.com/api/v1/templates

    Get a Specific Template

    curl "https://yourpim.com/api/v1/templates/2" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "template" : {
                "id": 2,
                "name": "Footer",
                "slug": "footer"
                ...
      }
    }
    

    This endpoint retrieves a specific template.

    HTTP Request

    GET https://yourpim.com/api/v1/templates/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the template to retrieve

    Create a Template

    curl "https://yourpim.com/api/v1/templates" \
      -X POST \
      -d '{
        "name":"Header",
        "slug":"header"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "template" : {
          "id" : 3,
          "name" : "Header",
          "slug" : "header"
          ...
      }
    }
    

    This endpoint creates a new template.

    HTTP Request

    POST https://yourpim.com/api/v1/templates

    Update a Specific Template

    curl "https://yourpim.com/api/v1/templates/2" \
      -X PUT \
      -d '{
        "name":"Other"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "template" : {
            "id": 2,
            "name": "Other",
            "slug": "footer"
          ...
      } 
    }
    

    This endpoint updates a specific template.

    HTTP Request

    PUT https://yourpim.com/api/v1/templates/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the template to update

    Webhooks

    Webhook Properties

    Property Description
    name (string) Webhook name
    callback_url (string) Webhook callback url
    entity_type (string) Webhook entity type (valid values: product, category, brand, product_asset, concrete_entity)
    include_entity_data (integer) Include data with the payload (valid values: 0 or 1)
    headers (json) Custom headers to include with the payload
    retry_policy (string) Retry policy in case of failure (valid values: linear, exponential, no_retry)
    minimum_retry_interval (integer) Interval time before retry (between 60 and 86400 in secondes)
    retry_limit (integer) Retry limit (between 0 and 10)
    channel_id (integer) PIM channel ID (channel specific webhook)
    event_type (string) Sync channel type (channel specific webhook)

    Get All Webhooks

    curl "https://yourpim.com/api/v1/webhooks" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
        "webhooks" :
            [
              {
                "id": 1,
                "created_at": "2022-01-10 15:14:18",
                "updated_at": "2022-01-10 15:14:18",
                "created_by": 12,
                "updated_by": 12,
                "status": "enabled",
                "name": "Product Update",
                "callback_url": "https://callback_url.com/product",
                "entity_type": "product",
                "include_entity_data": 1,
                "signing_secret":"KJrq5fKyBIVNjALfF27EHdtjhxFIN9q5tMpEi23kBGhO29Z4U9B89KsXEmKkAV8w",
                "headers": "{'header-title': 'header_value'}",
                "connection_timeout": 3,
                "retry_policy": "exponential",
                "minimum_retry_interval": 120,
                "retry_limit": 10
              },
              {
                "id": 2,
                "created_at": "2022-01-11 16:55:08",
                "updated_at": "2022-01-11 16:55:08",
                "created_by": 3,
                "updated_by": 3,
                "status": "enabled",
                "name": "Category Update",
                "callback_url": "https://callback_url.com/category",
                "entity_type": "category",
                "include_entity_data": 1,
                "signing_secret":"XMli5GAAKcrH81rIEXeDe4ZSOdc9B9FucEME3JeOD6VphbzPbb2Jr2MWJrLqtBrO",
                "headers": "{'header-title': 'header_value'}",
                "connection_timeout": 3,
                "retry_policy": "linear",
                "minimum_retry_interval": 120,
                "retry_limit": 10
              },
            ]
    }
    

    This endpoint will retrieve all webhooks.

    HTTP Request

    GET https://yourpim.com/api/v1/webhooks

    Get a Specific Webhook

    curl "https://yourpim.com/api/v1/webhooks/2" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "webhooks" : {
          "id": 2,
          "created_at": "2022-01-11 16:55:08",
          "updated_at": "2022-01-11 16:55:08",
          "created_by": 3,
          "updated_by": 3,
          "status": "enabled",
          "name": "Category Update",
          "callback_url": "https://callback_url.com/category",
          "entity_type": "category",
          "include_entity_data": 1,
          "signing_secret":"XMli5GAAKcrH81rIEXeDe4ZSOdc9B9FucEME3JeOD6VphbzPbb2Jr2MWJrLqtBrO",
          "headers": "{'header-title': 'header_value'}",
          "connection_timeout": 3,
          "retry_policy": "linear",
          "minimum_retry_interval": 120,
          "retry_limit": 10
      }
    }
    

    This endpoint will retrieve a specific webhook.

    HTTP Request

    GET https://yourpim.com/api/v1/webhooks/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the webhook to retrieve

    Create a Webhook

    curl "https://yourpim.com/api/v1/webhooks" \
      -X POST \
      -d '{
        "name": "Product Update",
        "callback_url": "https://callback_url.com/product",
        "include_entity_data" : "https://callback_url.com/product",
        "headers" : "{'header-title': 'header_value'}",
        "retry_policy" : "linear",
        "minimum_retry_interval" : 60,
        "retry_limit" : 15
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "webhooks" : {
          "id": 1,
          "created_at": "2022-01-11 16:55:08",
          "updated_at": "2022-01-11 16:55:08",
          "created_by": 3,
          "updated_by": 3,
          "status": "enabled",
          "name": "Product Update",
          "callback_url": "https://callback_url.com/product",
          "entity_type": "product",
          "include_entity_data": 1,
          "signing_secret":"sptRFZeCTzlkoECcUnnDt20ljzw8t8OuiqRiCEUAcTKUgXNkqCoPrr9oJGO5S3yi",
          "headers": "{'header-title': 'header_value'}",
          "connection_timeout": 3,
          "retry_policy": "linear",
          "minimum_retry_interval": 60,
          "retry_limit": 15
      }
    }
    

    This endpoint will create a webhook. The webhook will be enabled by default.

    HTTP Request

    POST https://yourpim.com/api/v1/webhooks

    Update a Webhook

    curl "https://yourpim.com/api/v1/webhooks/1" \
      -X PUT \
      -d '{
        "name": "Product Update Edited",
        "callback_url": "https://callback_url.com/product",
        "include_entity_data" : "https://callback_url.com/product",
        "headers" : "{'header-title': 'header_value'}",
        "retry_policy" : "linear",
        "minimum_retry_interval" : 60,
        "retry_limit" : 15
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "webhooks" : {
          "id": 1,
          "created_at": "2022-01-11 16:55:08",
          "updated_at": "2022-01-11 16:55:08",
          "created_by": 3,
          "updated_by": 3,
          "status": "enabled",
          "name": "Product Update Edited",
          "callback_url": "https://callback_url.com/product",
          "entity_type": "product",
          "include_entity_data": 1,
          "signing_secret":"sptRFZeCTzlkoECcUnnDt20ljzw8t8OuiqRiCEUAcTKUgXNkqCoPrr9oJGO5S3yi",
          "headers": "{'header-title': 'header_value'}",
          "connection_timeout": 3,
          "retry_policy": "linear",
          "minimum_retry_interval": 60,
          "retry_limit": 15
      }
    }
    

    This endpoint will update a webhook.

    HTTP Request

    PUT https://yourpim.com/api/v1/webhooks/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the webhook to retrieve

    Disable a Webhook

    curl "https://yourpim.com/api/v1/webhooks/1/disable" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "webhooks" : {
          "id": 1,
          "created_at": "2022-01-11 16:55:08",
          "updated_at": "2022-01-11 16:55:08",
          "created_by": 3,
          "updated_by": 3,
          "status": "disabled",
          "name": "Product Update",
          "callback_url": "https://callback_url.com/product",
          "entity_type": "product",
          "include_entity_data": 1,
          "signing_secret":"sptRFZeCTzlkoECcUnnDt20ljzw8t8OuiqRiCEUAcTKUgXNkqCoPrr9oJGO5S3yi",
          "headers": "{'header-title': 'header_value'}",
          "connection_timeout": 3,
          "retry_policy": "linear",
          "minimum_retry_interval": 60,
          "retry_limit": 15
      }
    }
    

    This endpoint will disable a webhook.

    HTTP Request

    PUT https://yourpim.com/api/v1/webhooks/<ID>/disable

    URL Parameters

    Parameter Description
    ID The ID of the webhook to retrieve

    Enable a Webhook

    curl "https://yourpim.com/api/v1/webhooks/1/enable" \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "webhooks" : {
          "id": 1,
          "created_at": "2022-01-11 16:55:08",
          "updated_at": "2022-01-11 16:55:08",
          "created_by": 3,
          "updated_by": 3,
          "status": "enabled",
          "name": "Product Update",
          "callback_url": "https://callback_url.com/product",
          "entity_type": "product",
          "include_entity_data": 1,
          "signing_secret":"sptRFZeCTzlkoECcUnnDt20ljzw8t8OuiqRiCEUAcTKUgXNkqCoPrr9oJGO5S3yi",
          "headers": "{'header-title': 'header_value'}",
          "connection_timeout": 3,
          "retry_policy": "linear",
          "minimum_retry_interval": 60,
          "retry_limit": 15
      }
    }
    

    This endpoint will enable a webhook.

    HTTP Request

    PUT https://yourpim.com/api/v1/webhooks/<ID>/enable

    URL Parameters

    Parameter Description
    ID The ID of the webhook to retrieve

    Errors

    The Jasper API uses the following error codes:

    Error Code Meaning
    200 Success -- The request was successfully processed by Jasper.
    201 Created -- The request has been fulfilled and a new resource has been created.
    202 Accepted --The request has been accepted, but not yet processed.
    400 Bad Request -- The request was not understood by the server.
    401 Unauthorized -- The server was unable to authenticate the request.
    403 Forbidden -- The current API user doesn't have correct permissions to execute the request.
    404 Not Found -- The requested resource cannot be found.
    418 I'm a teapot.
    429 Too Many Requests -- The request was not accepted because the application has exceeded the rate limit.
    500 Internal Server Error -- We had a problem with our server. Please report errors to Jasper.
    503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.