Before you get started, familiarize yourself with GraphQL concepts. We are constantly working on expanding our GraphQL API’s capabilities, and we will be designing future features using GraphQL with these concepts in mind.

To make requests to our GraphQL API, you must first be authenticated. A typical GraphQL request using cURL is below:

curl --request POST \
     --url https://app.finaleinventory.com/accountPathComponent/api/graphql \
     --header 'content-type: application/json' \
     --header 'authorization: Basic XXX' \
     --header 'connection: keep-alive' \
     --data-binary '{
       "query":"mutation ($jobUrl: String!, $status: String) { jobUpdate(input: {jobUrl: $jobUrl, status: $status}) { job { status } } }",
       "variables":{"jobUrl":"/demo/api/job/10002","status":"Canceled"},
     }'

Breaking down the request

  • content-type: for GraphQL Requests (and all API requests), the Content-Type must be set to application/json
  • authorization: Your base 64 encoded API key and secret.
  • connection: For some more complex GraphQL requests, it may take more than 2 minutes to complete. To prevent timeouts, specify keep-alive.
  • data-binary:
    • query: this is the GraphQL query itself, optionally with variables
    • variables: These are variables used in the GraphQL request