Go to Aptus OMS

Get started

The easiest way to get started, is to use the GraphQL Playground or if you want, you just can go ahead and start making your first requests to the Aptus Order Management GraphQL API.

What is GraphQL?

GraphQL is a strongly typed API query language that provides an alternative to REST. It allows clients to define the structure of the data required, and exactly the same structure of the data is returned from the server. This avoids both the problems of over and under-fetching data, while also allowing for a more powerful and efficient API.

Before reading these docs and using the Api its highly recommended you familiarise yourself a little bit with GraphQL by reading the official GraphQL documentation here

Making a GraphQL API Request

To start making requests to the Aptus Order Management API you must use the GraphQL endpoint in the URL below:

https://devorders.priusintelli.com/graphql

All queries and mutations made to the endpoint must be made as a POST request.

Also before executing any kind of request you must authenticate.

Authentication by Request Header

Pass the token generated by your user using the Authorization request header in your GraphQL client as below:

Authorization: <your-token-here>

Get API token

For the authentication within the platform you must first log in, this will generate a token which you can use later to perform the different queries and mutations in the GraphQL API.

Like the example below:

mutation{
  login(email: "admin", password: "admin"){
    token
    user{
      id
      name
      email
    }
  }
}

Response: the API token ready to be used for authentication

{
  "data": {
    "login": {
      "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImFkbWluIiwiaWQiOiJja2lkcTVjbmQwMDAwYjBkeXdwM3hldnphIiwiaWF0IjoxNjA4MDkyNTQwLCJleHAiOjE2MDgxMzU3NDB9.7PkhmUZGS3en1li_oJVyVImb2SwsDNROmHsK1epE3ek",
      "user": {
        "id": "ckidq5cnd0000b0dywp3xevza",
        "name": "Admin",
        "email": "admin"
      }
    }
  }
}

Making a simple query

Now that you have a token generated for your user and is setted up in the request header, you can make a simple query.

Me

This simple query returns information about your user like id, name, email and role.