NAV Navbar
shell
  • Introduction
  • Authentication
  • Admin
  • Attributes
  • Attribute Type Values
  • Attribute Sets
  • Attribute Set Attributes
  • Blocks
  • Block Assets
  • Brands
  • Brand Assets
  • Categories
  • Category Assets
  • Channels
  • Display Groups
  • Generic Entities
  • Concrete Entities
  • Options
  • Option Values
  • Option Sets
  • Option Set Options
  • Pages
  • Page Assets
  • Products
  • Product Assets
  • Product Prices
  • Product Inventory
  • Product Relation Types
  • Product Relations
  • Templates
  • 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
    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": "OEM ID",
                "type" : "text",
                "sort_order" : 1,
                "publish" : true
              },
              {
                "id": 2,
                "name": "Country of Origin",
                "type" : "text",
                "sort_order" : 2,
                "publish" : true
              }
            ]
    }
    

    This endpoint retrieves all attributes.

    HTTP Request

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

    Get a Specific Attribute

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

    The above command returns JSON structured like this:

    {
      "attribute" : {
                "id": 2,
                "name": "Country of Origin",
                "type" : "text",
                "sort_order" : 2,
                "publish" : true
      }
    }
    

    This endpoint retrieves a specific attribute.

    HTTP Request

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

    URL Parameters

    Parameter Description
    ID The ID of the attribute to retrieve

    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/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the attribute to update

    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/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the attribute to delete

    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)
    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/<ATTRIBUTEID>/type_values

    URL Parameters

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

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

    This endpoint retrieves a specific attribute type value.

    HTTP Request

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

    URL Parameters

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

    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/<ATTRIBUTEID>/type_values

    URL Parameters

    Parameter Description
    ATTRIBUTEID The ID of the attribute

    Update Attribute Type Value

    The API doesn't allow updating of type values. Contact support if necessary

    Delete a Specific Attribute Type Value

    The API doesn't allow deletion of type values. Contact support if necessary

    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

    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

    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

    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 Type 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"
              },
              {
                "id": 2,
                "option_id": 1,
                "value" : "No"
              }
            ]
    }
    

    This endpoint retrieves all option values for a specific option.

    HTTP Request

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

    URL Parameters

    Parameter Description
    OPTIONID 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"
      }
    }
    

    This endpoint retrieves a specific option value.

    HTTP Request

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

    URL Parameters

    Parameter Description
    ID The ID of the option value to retrieve
    OPTIONID 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"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

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

    This endpoint creates a new option value.

    HTTP Request

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

    URL Parameters

    Parameter Description
    OPTIONID 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"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

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

    This endpoint updates a specific option value.

    HTTP Request

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

    URL Parameters

    Parameter Description
    ID The ID of the option value to update
    OPTIONID 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/<OPTIONID>/values/<ID>

    URL Parameters

    Parameter Description
    ID The ID of the option value to delete
    OPTIONID 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)
    slug Slug
    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" \
      -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"
                ...
              }
            ]
    }
    

    This endpoint retrieves all products.

    HTTP Request

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

    Get a Specific Product

    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": "BLUE1"
                ...
      }
    }
    

    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

    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" : "GRREN1",
          "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": "Green"
            },
            {
                "option_id": 2,
                "option_value": 'XL'
            }
        ], 
        "parent_id" => 5, 
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product" : {
            "id" : 4,
            "name":"T-Shirt",
            "sku":"GREEN1",
            "option_values": [
                {
                    "option_id": 1,
                    "option_value": "Green"
                },
                {
                    "option_id": 2,
                    "option_value": "XL"
                }
            ], 
            "parent_id" => 5, 
            ...
      }
    }
    

    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"
       }' \
      -H "Authorization: Bearer {token}"
    

    The above command returns JSON structured like this:

    {
      "product" : {
                "id": 2,
                "name": "Bluish T-Shirt",
                "sku": "BLUE1"
                ...
      }
    }
    

    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

    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

    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
    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": "Description of image",
                "thumbnail" : 1, 
                ...
              },
              {
                "id": 2,
                "product_id": 1
                "uri": "https://cdnpim.com/coolimage.png",
                "alttext": "Description of image",
                "thumbnail" : 0, 
                ...
              }
            ]
    }
    

    This endpoint retrieves all product assets for a specific product.

    HTTP Request

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

    URL Parameters

    Parameter Description
    PRODUCTID 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": "Description of image",
                "thumbnail" : 1, 
                ...
      }
    }
    

    This endpoint retrieves a specific product asset.

    HTTP Request

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

    URL Parameters

    Parameter Description
    ID The ID of the product asset to retrieve
    PRODUCTID 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": "Description of image",
                "thumbnail" : 1,
                ...
      }
    }
    

    This endpoint creates a new product asset.

    HTTP Request

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

    URL Parameters

    Parameter Description
    PRODUCTID 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",
            "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": "Description of image",
            "thumbnail" : 1, 
            ...
      } 
    }
    

    This endpoint updates a specific product asset.

    HTTP Request

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

    URL Parameters

    Parameter Description
    ID The ID of the product asset to update
    PRODUCTID 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/<PRODUCTID>/assets/<ID>

    URL Parameters

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

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

    GET 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

    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

    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.