GraphQL Product Export API

GraphQL Product Export API

This API created by Custom Gateway allows you to get product information from CPP to enable it to be imported into other systems.

To utilise this you need to have an OMS OAUTH user set up with access to "Product Manager View" and "Product Manager List" along with any relevant categories. If you do not have an OAUTH user you can request one by emailing support@custom-gateway.com. When you have this you will be provided with a Client ID and client secret that you can use to authenticate on the API endpoint.

An example authentication request is below where the 2 red portions would be where you add your own credentials from the steps above (note running this requires you to have curl and jq installed.

TOKEN=`curl "https://oauth.custom-gateway.net/token" -d"client_id=**REDACTED**&client_secret=**REDACTED**&grant_type=client_credentials&scope=product.customisable.view products.customisable.list" -vv | jq .access_token -r`

Once you have authenticated and have obtained a token you can run the API endpoint with filters.


An example curl for this endpoint is available here which would follow on from the authentication above

curl -H"Authorization: Bearer $TOKEN" -d'{"query":"query($page: Int!, $filter: Json!) { core { products(filter: $filter, page: $page, count: 100) { pages { pageCount, current }, items { id, name, snapshots { large } } } } }", "variables": { "filter": { "category_id": 12345 }, "page": 1 } }' "https://graphql.custom-gateway.net"

The query is a bit easier to read when multiline:

query($page: Int!, $filter: Json!) {
      core {
            products(filter: $filter, page: $page, count: 250) {
                  pages {
                        pageCount
                        current
                  },

                  items {
                        id
                        name
                        snapshots {
                              large
                        }
                  }
            }
      }
}

You can also add addition information into the request, anything in CPP can be gathered this way, see the additional below exampe adding more

query($page: Int!, $filter: Json!) {
      core {
            products(filter: $filter, page: $page, count: 250) {
                  pages {
                        pageCount
                        current
                  },

                  items {
                        id
                       productCode
                       retail_sku
                       name
                       snapshots {
                              large
                        }

                     ecommerce {
                              sales_description
                              sales_description_long
                        }

                        legacy_tier_prices {
                              items {
                                    quantity
                                    price
                                    rrp
                        }
                  }
            }
      }
}



    • Related Articles

    • Standard Order Details Export API

      Custom Gateway have an API which can be called to gather order details from the OMS in JSON format. This function is available to users who have an Order Manager subscription or higher and is not available to OMS lite or free users. To utilise this ...
    • CPP V2 - Excel Import and Export

      The Excel import and export to and from CPP is a powerful tool which allows for bulk Blank product updates, and also serves a potential option for creating simple Blank products. Note: Attempting to amend Virtual Products is not advised and may lead ...
    • VPW Webhook Feed Export

      What does the Webhook feed do? Previously the ability to export a products retailer feed was available through CPP, which downloads a .csv file to the users system. The webhook feed produces the same data format as the retailer feed , however, it ...
    • KornitX Platform Imports & Exports - Attributes

      What Is An Attribute? An attribute acts as an option that can be added to a product set up, such as setting up sizes for garment products. CPP also offers to set these options internally, as separate order lines and group default. For example, if we ...
    • How to Get Product Images from Custom Product Platform

      Once a product has been created in Gateway CPP we automatically create multiple product images that you can use for general merchandising  To see these images go  Product Management Select Category of Products you want to see Choose "Export ...