Resets a purchase order to its initial state
curl --request POST \
--url https://api.light.inc/v1/purchase-orders/{purchaseOrderId}/reset \
--header 'Authorization: <api-key>'{
"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": {
"name": "<string>",
"type": "BAD_REQUEST",
"errors": [
{
"type": "<string>",
"message": "<string>",
"path": [
"<string>"
],
"context": {}
}
]
},
"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"
}
]
}
]
}Basic authentication header of the form Basic <api_key>, where <api_key> is your api key.
default response
⚠️ This enum is not exhaustive; new values may be added in the future.
IN_DRAFT, RESET_PENDING, APPROVED_ACCOUNTING_ENTRY_PENDING, OPEN, CLOSE_PENDING, CLOSED, CANCEL_PENDING, CANCELLED "USD"
Failure context when vendor onboarding fails.
Show child attributes
⚠️ This enum is not exhaustive; new values may be added in the future.
ALL_EDITS_ALLOWED, ALL_EDITS_LOCKED Show child attributes
Custom properties set on the vendor.
Show child attributes
curl --request POST \
--url https://api.light.inc/v1/purchase-orders/{purchaseOrderId}/reset \
--header 'Authorization: <api-key>'{
"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": {
"name": "<string>",
"type": "BAD_REQUEST",
"errors": [
{
"type": "<string>",
"message": "<string>",
"path": [
"<string>"
],
"context": {}
}
]
},
"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"
}
]
}
]
}