Orders

Order management.

The Orders Model

An order is represented by the following schema:

Scheme

  • Name
    id
    Type
    integer
    Description
    Unique order identifier
  • Name
    uniqueId
    Type
    string
    Description
    External order identifier used by clients
  • Name
    description
    Type
    string
    Description
    Additional details about the order assignment
  • Name
    fromAddress
    Type
    string
    Description
    Pickup location address
  • Name
    toAddress
    Type
    string
    Description
    Destination address
  • Name
    attributes
    Type
    object
    Description
    Custom order attributes

GET/orders

Retrieve a list of orders

Without params, it returns a list of Orders the user has access to

Authorizations

BasicAuth or ApiKey

  • Name
    BasicAuth
    Type
    scheme
    Description
    HTTP Authorization Scheme: basic
  • Name
    ApiKey
    Type
    scheme
    Description
    HTTP Authorization Scheme: bearer

Query Parameters

  • Name
    all
    Type
    boolean
    Description
    Can only be used by admins or managers to fetch all entities
  • Name
    userId
    Type
    integer
    Description
    Standard users can use this only with their own userId
  • Name
    excludeAttributes
    Type
    boolean
    Description
    Skip returning the attributes map
  • Name
    limit
    Type
    integer
    Description
    Limit the number of returned results
  • Name
    offset
    Type
    integer
    Description
    Offset for pagination
  • Name
    keyword
    Type
    string
    Description
    Search keyword filter

Responses

  • Name
    200
    Type
    success
    Description
  • Name
    application/json
    Type
    response schema
    Description
  • Array of Order

Request

GET
/orders
curl --location 'https://gw.onemap8.com/api/orders' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}'

Response

[
{
  "id": 0,
  "uniqueId": "string",
  "description": "string",
  "fromAddress": "string",
  "toAddress": "string",
  "attributes": {}
},
{
  ...
}
]

POST/orders

Create an order

Authorizations

BasicAuth or ApiKey

  • Name
    BasicAuth
    Type
    scheme
    Description
    HTTP Authorization Scheme: basic
  • Name
    ApiKey
    Type
    scheme
    Description
    HTTP Authorization Scheme: bearer

Request body schema

  • Name
    application/json
    Type
    schema
    Description

Body schema

  • Name
    id
    Type
    integer
    Description
    Unique order identifier
  • Name
    uniqueId
    Type
    string
    Description
    External order identifier used by clients
  • Name
    description
    Type
    string
    Description
    Additional details about the order assignment
  • Name
    fromAddress
    Type
    string
    Description
    Pickup location address
  • Name
    toAddress
    Type
    string
    Description
    Destination address
  • Name
    attributes
    Type
    object
    Description
    Custom order attributes

Responses

  • Name
    200
    Type
    success
    Description
  • Name
    application/json
    Type
    response schema
    Description
  • Order

Request

POST
/orders
curl --location 'https://gw.onemap8.com/api/orders' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}' \
--data '{
"id": "<integer>",
"uniqueId": "<string>",
"description": "<string>",
"fromAddress": "<string>",
"toAddress": "<string>",
"attributes": {}
}'

Response

{
"id": 0,
"uniqueId": "string",
"description": "string",
"fromAddress": "string",
"toAddress": "string",
"attributes": {}
}

PUT/orders/{id}

Update an order

Authorizations

BasicAuth or ApiKey

  • Name
    BasicAuth
    Type
    scheme
    Description
    HTTP Authorization Scheme: basic
  • Name
    ApiKey
    Type
    scheme
    Description
    HTTP Authorization Scheme: bearer

Path parameters

  • Name
    id
    Type
    integer required
    Description

Request body schema

  • Name
    application/json
    Type
    schema
    Description

Body schema

  • Name
    id
    Type
    integer
    Description
    Unique order identifier
  • Name
    uniqueId
    Type
    string
    Description
    External order identifier used by clients
  • Name
    description
    Type
    string
    Description
    Additional details about the order assignment
  • Name
    fromAddress
    Type
    string
    Description
    Pickup location address
  • Name
    toAddress
    Type
    string
    Description
    Destination address
  • Name
    attributes
    Type
    object
    Description
    Custom order attributes

Responses

  • Name
    200
    Type
    success
    Description
  • Name
    application/json
    Type
    response schema
    Description
  • Order

Request

PUT
/orders/{id}
curl --location --request PUT 'https://gw.onemap8.com/api/orders/<integer>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}' \
--data '{
"id": "<integer>",
"uniqueId": "<string>",
"description": "<string>",
"fromAddress": "<string>",
"toAddress": "<string>",
"attributes": {}
}'

Response

{
"id": 0,
"uniqueId": "string",
"description": "string",
"fromAddress": "string",
"toAddress": "string",
"attributes": {}
}

DELETE/orders/{id}

Delete an order

Authorizations

BasicAuth or ApiKey

  • Name
    BasicAuth
    Type
    scheme
    Description
    HTTP Authorization Scheme: basic
  • Name
    ApiKey
    Type
    scheme
    Description
    HTTP Authorization Scheme: bearer

Path parameters

  • Name
    id
    Type
    integer required
    Description

Responses

  • Name
    204
    Type
    success
    Description
    No content

Request

DELETE
/orders/{id}
curl --location --request DELETE 'https://gw.onemap8.com/api/orders/<integer>' \
--header 'Authorization: Basic {your_access_token}'

Response

No content
GET/orders/{id}

Fetch an Order

Authorizations

BasicAuth or ApiKey

  • Name
    BasicAuth
    Type
    scheme
    Description
    HTTP Authorization Scheme: basic
  • Name
    ApiKey
    Type
    scheme
    Description
    HTTP Authorization Scheme: bearer

Path parameters

  • Name
    id
    Type
    integer required
    Description

Response schema

  • Name
    application/json
    Type
    schema
    Description

Responses

  • Name
    200
    Type
    success
    Description
    Order
  • Name
    401
    Type
    error
    Description
    Unauthorized
  • Name
    404
    Type
    error
    Description
    Not found

Request

GET
/orders/{id}
curl --location 'https://gw.onemap8.com/api/orders/<integer>' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}'

Response

{
"id": 0,
"uniqueId": "<string>",
"description": "<string>",
"fromAddress": "<string>",
"toAddress": "<string>",
"attributes": {}
}