{
  "opencollection": "1.0.0",
  "info": {
    "name": "Xentral Account Sales Order API",
    "version": "v0.1"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Sales Order",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List sales orders",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{xentralId}.xentral.biz/api/v1/salesOrders",
            "params": [
              {
                "name": "page",
                "value": "",
                "type": "query"
              },
              {
                "name": "order",
                "value": "",
                "type": "query"
              },
              {
                "name": "filter",
                "value": "",
                "type": "query"
              }
            ]
          },
          "docs": "Returns a collection with all sales orders."
        },
        {
          "info": {
            "name": "Import sales order",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{xentralId}.xentral.biz/api/v1/salesOrders/actions/import",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Import a sales order from external marketplace"
        },
        {
          "info": {
            "name": "Dispatch sales order",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{xentralId}.xentral.biz/api/v1/salesOrders/:id/actions/dispatch",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The resource's identifier."
              }
            ]
          },
          "docs": "Dispatch a released sales order, if it fulfills all requirements"
        },
        {
          "info": {
            "name": "Cancel sales order",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{xentralId}.xentral.biz/api/v1/salesOrders/:id/actions/cancel",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The resource's identifier."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Cancels a sales order. Only sales orders in status 'created' or 'completed' can be canceled. For draft sales orders use the delete endpoint."
        },
        {
          "info": {
            "name": "Create partial sales order",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://{xentralId}.xentral.biz/api/v1/salesOrders/:id/actions/createPartialSalesOrder",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The resource's identifier."
              }
            ]
          },
          "docs": "This endpoint creates a partial delivery sales order for an existing sales order. The partial delivery sales order will be copied from the existing sales order without any positions and gets linked as partial delivery sales order. Adding positions to the partial delivery sales order needs to be done by using the Update existing sales order endpoint. Please pay attention to remove the positions in the original sales order or to adjust the quantities if you do not fully transfer the whole position"
        },
        {
          "info": {
            "name": "View sales order",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{xentralId}.xentral.biz/api/v1/salesOrders/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The resource's identifier."
              }
            ]
          },
          "docs": "Returns details of a sales order"
        },
        {
          "info": {
            "name": "Update sales order",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://{xentralId}.xentral.biz/api/v1/salesOrders/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The resource's identifier."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "<strong>CAUTION: Positions not specified in the payload will be DELETED. Please pass the ids along if you need them to be preserved.</strong><br><br>The sales order edit endpoint allows for updating an existing sales order. When updating, any positions not included in the positions payload will be implicitly deleted from the order. This ensures that the positions list in the payload accurately reflects the desired state of the sales order after the update."
        },
        {
          "info": {
            "name": "Delete sales order",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://{xentralId}.xentral.biz/api/v1/salesOrders/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The resource's identifier."
              }
            ]
          },
          "docs": "Deletes a sales order in draft status"
        },
        {
          "info": {
            "name": "List sales order documents",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{xentralId}.xentral.biz/api/v1/salesOrders/:id/documents",
            "params": [
              {
                "name": "filter",
                "value": "",
                "type": "query"
              },
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The resource's identifier."
              },
              {
                "name": "page",
                "value": "",
                "type": "query"
              }
            ]
          },
          "docs": "Returns a list of given sales order documents"
        },
        {
          "info": {
            "name": "Create sales order document",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{xentralId}.xentral.biz/api/v1/salesOrders/:id/documents",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The resource's identifier."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates new sales order document"
        },
        {
          "info": {
            "name": "Update multiple sales order documents",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://{xentralId}.xentral.biz/api/v1/salesOrders/:id/documents",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The resource's identifier."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Updates multiple sales order documents"
        },
        {
          "info": {
            "name": "Delete multiple sales order documents",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://{xentralId}.xentral.biz/api/v1/salesOrders/:id/documents",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The resource's identifier."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Deletes a multiple sales order documents"
        },
        {
          "info": {
            "name": "View sales order document",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{xentralId}.xentral.biz/api/v1/salesOrders/:id/documents/:documentId",
            "params": [
              {
                "name": "documentId",
                "value": "",
                "type": "path",
                "description": "ID of document"
              },
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The resource's identifier."
              },
              {
                "name": "page",
                "value": "",
                "type": "query"
              }
            ]
          },
          "docs": "Returns details of a single sales order document"
        }
      ]
    }
  ],
  "bundled": true
}