POST
/
ext
/
v1
/
purchase-orders
/
{purchaseOrderId}
/
lock
Locks the purchase order
curl --request POST \
  --url https://api.light.inc/rest/ext/v1/purchase-orders/{purchaseOrderId}/lock
{
  "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",
  "totalAmount": 123,
  "totalNetAmount": 123,
  "totalTaxAmount": 123,
  "erpNumber": "<string>",
  "description": "<string>",
  "currency": "USD",
  "ownerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "vendorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "vendorEmail": "<string>",
  "deliveryAddress": "<string>",
  "deliveryDate": "2023-12-25",
  "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>"
  },
  "editStatus": "ALL_EDITS_ALLOWED",
  "purchaseOrderDate": "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>",
      "costCenterId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "taxCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "quantity": 123,
      "unitPrice": 123,
      "amount": 123,
      "netAmount": 123,
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "customProperties": [
        {
          "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "groupInternalName": "<string>",
          "values": [
            {
              "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "groupInternalName": "<string>",
              "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "internalName": "<string>",
              "label": "<string>",
              "context": "<string>",
              "createdAt": "2023-11-07T05:31:56Z",
              "updatedAt": "2023-11-07T05:31:56Z"
            }
          ]
        }
      ]
    }
  ],
  "customProperties": [
    {
      "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "groupInternalName": "<string>",
      "values": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "groupInternalName": "<string>",
          "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "internalName": "<string>",
          "label": "<string>",
          "context": "<string>",
          "createdAt": "2023-11-07T05:31:56Z",
          "updatedAt": "2023-11-07T05:31:56Z"
        }
      ]
    }
  ]
}

Path Parameters

purchaseOrderId
string
required

Response

default - application/json;charset=UTF-8

default response

The response is of type object.