GET
/
ext
/
v1
/
purchase-orders
List purchase orders
curl --request GET \
  --url https://api.light.inc/rest/ext/v1/purchase-orders
{
  "total": 123,
  "records": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "companyEntityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "purchaseRequestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "state": "IN_DRAFT",
      "erpNumber": "<string>",
      "description": "<string>",
      "currency": "USD",
      "totalAmount": 123,
      "totalNetAmount": 123,
      "totalTaxAmount": 123,
      "totalMatchedAmount": 123,
      "ownerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "ownerName": "<string>",
      "vendorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "vendorEmail": "<string>",
      "vendorName": "<string>",
      "vendorAvatarUrl": "<string>",
      "documentKey": "<string>",
      "failureContext": {
        "type": "BAD_REQUEST",
        "errors": [
          {
            "type": "<string>",
            "clientMessage": "<string>",
            "message": "<string>",
            "path": [
              "<string>"
            ],
            "context": {}
          }
        ],
        "stackTrace": [
          {
            "classLoaderName": "<string>",
            "moduleName": "<string>",
            "moduleVersion": "<string>",
            "methodName": "<string>",
            "fileName": "<string>",
            "lineNumber": 123,
            "nativeMethod": true,
            "className": "<string>"
          }
        ],
        "message": "<string>",
        "suppressed": [
          {
            "stackTrace": [
              {
                "classLoaderName": "<string>",
                "moduleName": "<string>",
                "moduleVersion": "<string>",
                "methodName": "<string>",
                "fileName": "<string>",
                "lineNumber": 123,
                "nativeMethod": true,
                "className": "<string>"
              }
            ],
            "message": "<string>",
            "localizedMessage": "<string>"
          }
        ],
        "localizedMessage": "<string>",
        "name": "<string>"
      },
      "purchaseOrderDate": "2023-12-25",
      "deliveryAddress": "<string>",
      "deliveryDate": "2023-12-25",
      "erpSyncedAt": "2023-11-07T05:31:56Z",
      "lockedAt": "2023-11-07T05:31:56Z",
      "closedAt": "2023-11-07T05:31:56Z",
      "cancelledAt": "2023-11-07T05:31:56Z",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "lines": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "purchaseOrderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "description": "<string>",
          "quantity": 123,
          "unitPrice": 123,
          "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "accountLabel": "<string>",
          "taxCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "amount": 123,
          "taxAmount": 123,
          "netAmount": 123,
          "taxCodeLabel": "<string>",
          "costCenterId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "costCenterName": "<string>",
          "createdAt": "2023-11-07T05:31:56Z",
          "updatedAt": "2023-11-07T05:31:56Z"
        }
      ]
    }
  ]
}

Query Parameters

sort
string
Example:

"amount:desc,createdAt:asc"

filter
string
Example:

"state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500"

searchTerm
string
limit
integer
offset
integer

Response

default - application/json;charset=UTF-8

default response

The response is of type object.