AlphaAlpha Docs

Purchase Orders

API calls concerning purchase orders

Create an order

POST
/purchase-orders
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/purchase-orders" \  -H "Content-Type: application/json" \  -d '{    "products": [      {        "price": 0.1,        "productId": "string",        "quantity": 0.1,        "unit": "string"      }    ],    "subsidiaryId": "string"  }'
{
  "acceptedProducts": [
    {
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "actualDeliveryDate": "2019-08-24T14:15:22Z",
  "allowOverdraft": true,
  "amountUsed": 0.1,
  "approvalRuleSnapshot": {
    "amountThreshold": 0.1,
    "approvalMode": "ANY",
    "approverUserIds": [
      "string"
    ],
    "globalApproverUserIds": [
      "string"
    ],
    "ruleId": "string"
  },
  "attachments": [
    {
      "blobId": "string",
      "created": "2019-08-24T14:15:22Z",
      "extension": "string",
      "fileSize": 0,
      "name": "string",
      "type": "IMAGE"
    }
  ],
  "baseConversionRate": 0.1,
  "cancellationReason": "string",
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "currency": "string",
  "currentLocation": {
    "address": {
      "city": "string",
      "country": "string",
      "houseNumber": "string",
      "id": "string",
      "latitude": 0.1,
      "longitude": 0.1,
      "postalCode": "string",
      "street": "string"
    },
    "coordinate": {
      "latitude": -90,
      "longitude": -180
    },
    "name": "string"
  },
  "deliveryAddress": {
    "city": "string",
    "country": "string",
    "houseNumber": "string",
    "id": "string",
    "latitude": 0.1,
    "longitude": 0.1,
    "postalCode": "string",
    "street": "string"
  },
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedDeliveryDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "internalApprovals": [
    {
      "approved": true,
      "by": "string",
      "on": "2019-08-24T14:15:22Z",
      "reason": "string"
    }
  ],
  "internalReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "mailBody": "string",
  "note": "string",
  "pdf": {
    "blobId": "string",
    "created": "2019-08-24T14:15:22Z",
    "extension": "string",
    "fileSize": 0,
    "name": "string",
    "type": "IMAGE"
  },
  "percentageUsed": 0.1,
  "productStatus": [
    {
      "amountLeft": 0.1,
      "percentagePending": 0.1,
      "percentageReceived": 0.1,
      "percentageRejected": 0.1,
      "productId": "string",
      "quantityAccepted": 0.1,
      "quantityRejected": 0.1,
      "totalQuantity": 0.1,
      "unitPrice": 0.1
    }
  ],
  "products": [
    {
      "baseUnitConversion": 0.1,
      "baseUnitQuantity": 0.1,
      "canReceive": true,
      "currency": "string",
      "imageAssets": [
        {
          "blobId": "string",
          "created": "2019-08-24T14:15:22Z",
          "extension": "string",
          "fileSize": 0,
          "name": "string",
          "type": "IMAGE"
        }
      ],
      "price": 0.1,
      "pricePerBaseUnit": 0.1,
      "productId": "string",
      "productName": "string",
      "quantity": 0.1,
      "sourceLocationId": "string",
      "totalPrice": 0.1,
      "unit": "string",
      "unitsOfMeasurement": [
        {
          "baseUnit": true,
          "cost": 0.1,
          "decimal": true,
          "isBaseUnit": true,
          "isDecimal": true,
          "name": "string",
          "quantity": 0.1,
          "salesPrice": 0.1,
          "unit": "string"
        }
      ]
    }
  ],
  "rejectedProducts": [
    {
      "batches": [
        {
          "quantity": 0.1,
          "reason": "string"
        }
      ],
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "rejectionReason": "string",
  "sentMails": [
    "string"
  ],
  "status": "DRAFT",
  "stockSiteId": "string",
  "subsidiaryId": "string",
  "supplierEmail": "string",
  "supplierId": "string",
  "supplierReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "tenantId": "string",
  "total": 0.1,
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Download Csv_ Purchase Order

GET
/purchase-orders/csv-export
AuthorizationBearer <token>

In: header

Query Parameters

search?array<>
filters?array<>
page?integer
Default0
Formatint32
size?integer
Default20
Formatint32
sort?string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/purchase-orders/csv-export"
"string"
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Delete a list of entities by their IDs

DELETE
/purchase-orders/delete-list
AuthorizationBearer <token>

In: header

Query Parameters

ids*array<>

Response Body

application/json

application/json

application/json

curl -X DELETE "http://localhost:18080/api/v1/purchase-orders/delete-list?ids=string"
Empty
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Dynamic Search_ Purchase Order

GET
/purchase-orders/dynamic-search
AuthorizationBearer <token>

In: header

Query Parameters

search?array<>
filters?array<>
page?integer
Default0
Formatint32
size?integer
Default20
Formatint32
sort?string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/purchase-orders/dynamic-search"
{
  "content": [
    {
      "acceptedProducts": [
        {
          "productId": "string",
          "quantity": 0.1
        }
      ],
      "accessTokenHash": "string",
      "actualDeliveryDate": "2019-08-24T14:15:22Z",
      "allowOverdraft": true,
      "amountAccepted": 0.1,
      "amountOfProducts": 0.1,
      "amountRejected": 0.1,
      "approvalRuleSnapshot": {
        "amountThreshold": 0.1,
        "approvalMode": "ANY",
        "approverUserIds": [
          "string"
        ],
        "globalApproverUserIds": [
          "string"
        ],
        "ruleId": "string"
      },
      "attachments": [
        {
          "blobId": "string",
          "created": "2019-08-24T14:15:22Z",
          "extension": "string",
          "fileSize": 0,
          "name": "string",
          "type": "IMAGE"
        }
      ],
      "baseConversionRate": 0.1,
      "cancellationReason": "string",
      "created": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "currency": "string",
      "currentLocation": {
        "address": {
          "city": "string",
          "country": "string",
          "houseNumber": "string",
          "id": "string",
          "latitude": 0.1,
          "longitude": 0.1,
          "postalCode": "string",
          "street": "string"
        },
        "coordinate": {
          "latitude": -90,
          "longitude": -180
        },
        "name": "string"
      },
      "deliveryAddress": {
        "city": "string",
        "country": "string",
        "houseNumber": "string",
        "id": "string",
        "latitude": 0.1,
        "longitude": 0.1,
        "postalCode": "string",
        "street": "string"
      },
      "events": [
        {
          "authorId": "string",
          "date": "2019-08-24T14:15:22Z",
          "description": "string",
          "id": "string",
          "type": "CREATE"
        }
      ],
      "expectedDeliveryDate": "2019-08-24T14:15:22Z",
      "id": "string",
      "internalApprovals": [
        {
          "approved": true,
          "by": "string",
          "on": "2019-08-24T14:15:22Z",
          "reason": "string"
        }
      ],
      "internalReview": {
        "approved": true,
        "by": "string",
        "on": "2019-08-24T14:15:22Z",
        "reason": "string"
      },
      "isLocked": true,
      "localizedTotal": 0.1,
      "mailBody": "string",
      "note": "string",
      "pdf": {
        "blobId": "string",
        "created": "2019-08-24T14:15:22Z",
        "extension": "string",
        "fileSize": 0,
        "name": "string",
        "type": "IMAGE"
      },
      "percentageAccepted": 0.1,
      "percentageRejected": 0.1,
      "products": [
        {
          "baseUnitConversion": 0.1,
          "baseUnitQuantity": 0.1,
          "pricePerBaseUnit": 0.1,
          "pricePerUnit": 0.1,
          "productId": "string",
          "quantity": 0.1,
          "totalPrice": 0.1,
          "unit": "string"
        }
      ],
      "rejectedProducts": [
        {
          "batches": [
            {
              "quantity": 0.1,
              "reason": "string"
            }
          ],
          "productId": "string",
          "quantity": 0.1
        }
      ],
      "rejectionReason": "string",
      "sentMails": [
        "string"
      ],
      "shortageProducts": [
        {
          "batches": [
            {
              "quantity": 0.1,
              "reason": "string",
              "resolutions": [
                {
                  "glAccountId": "string",
                  "id": "string",
                  "quantity": 0.1,
                  "referenceId": "string",
                  "resolvedAt": "2019-08-24T14:15:22Z",
                  "resolvedBy": "string",
                  "type": "DEBIT_NOTE"
                }
              ],
              "resolvedQuantity": 0.1,
              "unresolvedQuantity": 0.1
            }
          ],
          "productId": "string",
          "quantity": 0.1,
          "resolvedQuantity": 0.1,
          "unresolvedQuantity": 0.1
        }
      ],
      "signature": {
        "blobId": "string",
        "created": "2019-08-24T14:15:22Z",
        "extension": "string",
        "fileSize": 0,
        "name": "string",
        "type": "IMAGE"
      },
      "signedAt": "2019-08-24T14:15:22Z",
      "signedBy": "string",
      "status": "DRAFT",
      "stockSiteId": "string",
      "subsidiaryId": "string",
      "supplierEmail": "string",
      "supplierId": "string",
      "supplierReview": {
        "approved": true,
        "by": "string",
        "on": "2019-08-24T14:15:22Z",
        "reason": "string"
      },
      "tenantId": "string",
      "total": 0.1,
      "updated": "2019-08-24T14:15:22Z",
      "updatedBy": "string"
    }
  ],
  "empty": true,
  "first": true,
  "last": true,
  "number": 0,
  "numberOfElements": 0,
  "pageable": {
    "offset": 0,
    "pageNumber": 0,
    "pageSize": 0,
    "paged": true,
    "sort": {
      "empty": true,
      "sorted": true,
      "unsorted": true
    },
    "unpaged": true
  },
  "size": 0,
  "sort": {
    "empty": true,
    "sorted": true,
    "unsorted": true
  },
  "totalElements": 0,
  "totalPages": 0
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Dynamic Search Post_ Purchase Order

POST
/purchase-orders/dynamic-search
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/purchase-orders/dynamic-search" \  -H "Content-Type: application/json" \  -d '{    "filters": {      "property1": null,      "property2": null    },    "page": 0,    "search": [      "string"    ],    "size": 0,    "sort": [      {        "ascending": true,        "field": "string"      }    ]  }'
{
  "content": [
    {
      "acceptedProducts": [
        {
          "productId": "string",
          "quantity": 0.1
        }
      ],
      "accessTokenHash": "string",
      "actualDeliveryDate": "2019-08-24T14:15:22Z",
      "allowOverdraft": true,
      "amountAccepted": 0.1,
      "amountOfProducts": 0.1,
      "amountRejected": 0.1,
      "approvalRuleSnapshot": {
        "amountThreshold": 0.1,
        "approvalMode": "ANY",
        "approverUserIds": [
          "string"
        ],
        "globalApproverUserIds": [
          "string"
        ],
        "ruleId": "string"
      },
      "attachments": [
        {
          "blobId": "string",
          "created": "2019-08-24T14:15:22Z",
          "extension": "string",
          "fileSize": 0,
          "name": "string",
          "type": "IMAGE"
        }
      ],
      "baseConversionRate": 0.1,
      "cancellationReason": "string",
      "created": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "currency": "string",
      "currentLocation": {
        "address": {
          "city": "string",
          "country": "string",
          "houseNumber": "string",
          "id": "string",
          "latitude": 0.1,
          "longitude": 0.1,
          "postalCode": "string",
          "street": "string"
        },
        "coordinate": {
          "latitude": -90,
          "longitude": -180
        },
        "name": "string"
      },
      "deliveryAddress": {
        "city": "string",
        "country": "string",
        "houseNumber": "string",
        "id": "string",
        "latitude": 0.1,
        "longitude": 0.1,
        "postalCode": "string",
        "street": "string"
      },
      "events": [
        {
          "authorId": "string",
          "date": "2019-08-24T14:15:22Z",
          "description": "string",
          "id": "string",
          "type": "CREATE"
        }
      ],
      "expectedDeliveryDate": "2019-08-24T14:15:22Z",
      "id": "string",
      "internalApprovals": [
        {
          "approved": true,
          "by": "string",
          "on": "2019-08-24T14:15:22Z",
          "reason": "string"
        }
      ],
      "internalReview": {
        "approved": true,
        "by": "string",
        "on": "2019-08-24T14:15:22Z",
        "reason": "string"
      },
      "isLocked": true,
      "localizedTotal": 0.1,
      "mailBody": "string",
      "note": "string",
      "pdf": {
        "blobId": "string",
        "created": "2019-08-24T14:15:22Z",
        "extension": "string",
        "fileSize": 0,
        "name": "string",
        "type": "IMAGE"
      },
      "percentageAccepted": 0.1,
      "percentageRejected": 0.1,
      "products": [
        {
          "baseUnitConversion": 0.1,
          "baseUnitQuantity": 0.1,
          "pricePerBaseUnit": 0.1,
          "pricePerUnit": 0.1,
          "productId": "string",
          "quantity": 0.1,
          "totalPrice": 0.1,
          "unit": "string"
        }
      ],
      "rejectedProducts": [
        {
          "batches": [
            {
              "quantity": 0.1,
              "reason": "string"
            }
          ],
          "productId": "string",
          "quantity": 0.1
        }
      ],
      "rejectionReason": "string",
      "sentMails": [
        "string"
      ],
      "shortageProducts": [
        {
          "batches": [
            {
              "quantity": 0.1,
              "reason": "string",
              "resolutions": [
                {
                  "glAccountId": "string",
                  "id": "string",
                  "quantity": 0.1,
                  "referenceId": "string",
                  "resolvedAt": "2019-08-24T14:15:22Z",
                  "resolvedBy": "string",
                  "type": "DEBIT_NOTE"
                }
              ],
              "resolvedQuantity": 0.1,
              "unresolvedQuantity": 0.1
            }
          ],
          "productId": "string",
          "quantity": 0.1,
          "resolvedQuantity": 0.1,
          "unresolvedQuantity": 0.1
        }
      ],
      "signature": {
        "blobId": "string",
        "created": "2019-08-24T14:15:22Z",
        "extension": "string",
        "fileSize": 0,
        "name": "string",
        "type": "IMAGE"
      },
      "signedAt": "2019-08-24T14:15:22Z",
      "signedBy": "string",
      "status": "DRAFT",
      "stockSiteId": "string",
      "subsidiaryId": "string",
      "supplierEmail": "string",
      "supplierId": "string",
      "supplierReview": {
        "approved": true,
        "by": "string",
        "on": "2019-08-24T14:15:22Z",
        "reason": "string"
      },
      "tenantId": "string",
      "total": 0.1,
      "updated": "2019-08-24T14:15:22Z",
      "updatedBy": "string"
    }
  ],
  "empty": true,
  "first": true,
  "last": true,
  "number": 0,
  "numberOfElements": 0,
  "pageable": {
    "offset": 0,
    "pageNumber": 0,
    "pageSize": 0,
    "paged": true,
    "sort": {
      "empty": true,
      "sorted": true,
      "unsorted": true
    },
    "unpaged": true
  },
  "size": 0,
  "sort": {
    "empty": true,
    "sorted": true,
    "unsorted": true
  },
  "totalElements": 0,
  "totalPages": 0
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Create an empty order

POST
/purchase-orders/empty
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/purchase-orders/empty"
{
  "acceptedProducts": [
    {
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "actualDeliveryDate": "2019-08-24T14:15:22Z",
  "allowOverdraft": true,
  "amountUsed": 0.1,
  "approvalRuleSnapshot": {
    "amountThreshold": 0.1,
    "approvalMode": "ANY",
    "approverUserIds": [
      "string"
    ],
    "globalApproverUserIds": [
      "string"
    ],
    "ruleId": "string"
  },
  "attachments": [
    {
      "blobId": "string",
      "created": "2019-08-24T14:15:22Z",
      "extension": "string",
      "fileSize": 0,
      "name": "string",
      "type": "IMAGE"
    }
  ],
  "baseConversionRate": 0.1,
  "cancellationReason": "string",
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "currency": "string",
  "currentLocation": {
    "address": {
      "city": "string",
      "country": "string",
      "houseNumber": "string",
      "id": "string",
      "latitude": 0.1,
      "longitude": 0.1,
      "postalCode": "string",
      "street": "string"
    },
    "coordinate": {
      "latitude": -90,
      "longitude": -180
    },
    "name": "string"
  },
  "deliveryAddress": {
    "city": "string",
    "country": "string",
    "houseNumber": "string",
    "id": "string",
    "latitude": 0.1,
    "longitude": 0.1,
    "postalCode": "string",
    "street": "string"
  },
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedDeliveryDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "internalApprovals": [
    {
      "approved": true,
      "by": "string",
      "on": "2019-08-24T14:15:22Z",
      "reason": "string"
    }
  ],
  "internalReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "mailBody": "string",
  "note": "string",
  "pdf": {
    "blobId": "string",
    "created": "2019-08-24T14:15:22Z",
    "extension": "string",
    "fileSize": 0,
    "name": "string",
    "type": "IMAGE"
  },
  "percentageUsed": 0.1,
  "productStatus": [
    {
      "amountLeft": 0.1,
      "percentagePending": 0.1,
      "percentageReceived": 0.1,
      "percentageRejected": 0.1,
      "productId": "string",
      "quantityAccepted": 0.1,
      "quantityRejected": 0.1,
      "totalQuantity": 0.1,
      "unitPrice": 0.1
    }
  ],
  "products": [
    {
      "baseUnitConversion": 0.1,
      "baseUnitQuantity": 0.1,
      "canReceive": true,
      "currency": "string",
      "imageAssets": [
        {
          "blobId": "string",
          "created": "2019-08-24T14:15:22Z",
          "extension": "string",
          "fileSize": 0,
          "name": "string",
          "type": "IMAGE"
        }
      ],
      "price": 0.1,
      "pricePerBaseUnit": 0.1,
      "productId": "string",
      "productName": "string",
      "quantity": 0.1,
      "sourceLocationId": "string",
      "totalPrice": 0.1,
      "unit": "string",
      "unitsOfMeasurement": [
        {
          "baseUnit": true,
          "cost": 0.1,
          "decimal": true,
          "isBaseUnit": true,
          "isDecimal": true,
          "name": "string",
          "quantity": 0.1,
          "salesPrice": 0.1,
          "unit": "string"
        }
      ]
    }
  ],
  "rejectedProducts": [
    {
      "batches": [
        {
          "quantity": 0.1,
          "reason": "string"
        }
      ],
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "rejectionReason": "string",
  "sentMails": [
    "string"
  ],
  "status": "DRAFT",
  "stockSiteId": "string",
  "subsidiaryId": "string",
  "supplierEmail": "string",
  "supplierId": "string",
  "supplierReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "tenantId": "string",
  "total": 0.1,
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Find by list of ids in current tenant

GET
/purchase-orders/find
AuthorizationBearer <token>

In: header

Query Parameters

ids*array<>

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/purchase-orders/find?ids=string"
[
  {
    "acceptedProducts": [
      {
        "productId": "string",
        "quantity": 0.1
      }
    ],
    "accessTokenHash": "string",
    "actualDeliveryDate": "2019-08-24T14:15:22Z",
    "allowOverdraft": true,
    "amountAccepted": 0.1,
    "amountOfProducts": 0.1,
    "amountRejected": 0.1,
    "approvalRuleSnapshot": {
      "amountThreshold": 0.1,
      "approvalMode": "ANY",
      "approverUserIds": [
        "string"
      ],
      "globalApproverUserIds": [
        "string"
      ],
      "ruleId": "string"
    },
    "attachments": [
      {
        "blobId": "string",
        "created": "2019-08-24T14:15:22Z",
        "extension": "string",
        "fileSize": 0,
        "name": "string",
        "type": "IMAGE"
      }
    ],
    "baseConversionRate": 0.1,
    "cancellationReason": "string",
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "currency": "string",
    "currentLocation": {
      "address": {
        "city": "string",
        "country": "string",
        "houseNumber": "string",
        "id": "string",
        "latitude": 0.1,
        "longitude": 0.1,
        "postalCode": "string",
        "street": "string"
      },
      "coordinate": {
        "latitude": -90,
        "longitude": -180
      },
      "name": "string"
    },
    "deliveryAddress": {
      "city": "string",
      "country": "string",
      "houseNumber": "string",
      "id": "string",
      "latitude": 0.1,
      "longitude": 0.1,
      "postalCode": "string",
      "street": "string"
    },
    "events": [
      {
        "authorId": "string",
        "date": "2019-08-24T14:15:22Z",
        "description": "string",
        "id": "string",
        "type": "CREATE"
      }
    ],
    "expectedDeliveryDate": "2019-08-24T14:15:22Z",
    "id": "string",
    "internalApprovals": [
      {
        "approved": true,
        "by": "string",
        "on": "2019-08-24T14:15:22Z",
        "reason": "string"
      }
    ],
    "internalReview": {
      "approved": true,
      "by": "string",
      "on": "2019-08-24T14:15:22Z",
      "reason": "string"
    },
    "isLocked": true,
    "localizedTotal": 0.1,
    "mailBody": "string",
    "note": "string",
    "pdf": {
      "blobId": "string",
      "created": "2019-08-24T14:15:22Z",
      "extension": "string",
      "fileSize": 0,
      "name": "string",
      "type": "IMAGE"
    },
    "percentageAccepted": 0.1,
    "percentageRejected": 0.1,
    "products": [
      {
        "baseUnitConversion": 0.1,
        "baseUnitQuantity": 0.1,
        "pricePerBaseUnit": 0.1,
        "pricePerUnit": 0.1,
        "productId": "string",
        "quantity": 0.1,
        "totalPrice": 0.1,
        "unit": "string"
      }
    ],
    "rejectedProducts": [
      {
        "batches": [
          {
            "quantity": 0.1,
            "reason": "string"
          }
        ],
        "productId": "string",
        "quantity": 0.1
      }
    ],
    "rejectionReason": "string",
    "sentMails": [
      "string"
    ],
    "shortageProducts": [
      {
        "batches": [
          {
            "quantity": 0.1,
            "reason": "string",
            "resolutions": [
              {
                "glAccountId": "string",
                "id": "string",
                "quantity": 0.1,
                "referenceId": "string",
                "resolvedAt": "2019-08-24T14:15:22Z",
                "resolvedBy": "string",
                "type": "DEBIT_NOTE"
              }
            ],
            "resolvedQuantity": 0.1,
            "unresolvedQuantity": 0.1
          }
        ],
        "productId": "string",
        "quantity": 0.1,
        "resolvedQuantity": 0.1,
        "unresolvedQuantity": 0.1
      }
    ],
    "signature": {
      "blobId": "string",
      "created": "2019-08-24T14:15:22Z",
      "extension": "string",
      "fileSize": 0,
      "name": "string",
      "type": "IMAGE"
    },
    "signedAt": "2019-08-24T14:15:22Z",
    "signedBy": "string",
    "status": "DRAFT",
    "stockSiteId": "string",
    "subsidiaryId": "string",
    "supplierEmail": "string",
    "supplierId": "string",
    "supplierReview": {
      "approved": true,
      "by": "string",
      "on": "2019-08-24T14:15:22Z",
      "reason": "string"
    },
    "tenantId": "string",
    "total": 0.1,
    "updated": "2019-08-24T14:15:22Z",
    "updatedBy": "string"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Find all for current tenant

GET
/purchase-orders/find-all
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/purchase-orders/find-all"
[
  {
    "acceptedProducts": [
      {
        "productId": "string",
        "quantity": 0.1
      }
    ],
    "accessTokenHash": "string",
    "actualDeliveryDate": "2019-08-24T14:15:22Z",
    "allowOverdraft": true,
    "amountAccepted": 0.1,
    "amountOfProducts": 0.1,
    "amountRejected": 0.1,
    "approvalRuleSnapshot": {
      "amountThreshold": 0.1,
      "approvalMode": "ANY",
      "approverUserIds": [
        "string"
      ],
      "globalApproverUserIds": [
        "string"
      ],
      "ruleId": "string"
    },
    "attachments": [
      {
        "blobId": "string",
        "created": "2019-08-24T14:15:22Z",
        "extension": "string",
        "fileSize": 0,
        "name": "string",
        "type": "IMAGE"
      }
    ],
    "baseConversionRate": 0.1,
    "cancellationReason": "string",
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "currency": "string",
    "currentLocation": {
      "address": {
        "city": "string",
        "country": "string",
        "houseNumber": "string",
        "id": "string",
        "latitude": 0.1,
        "longitude": 0.1,
        "postalCode": "string",
        "street": "string"
      },
      "coordinate": {
        "latitude": -90,
        "longitude": -180
      },
      "name": "string"
    },
    "deliveryAddress": {
      "city": "string",
      "country": "string",
      "houseNumber": "string",
      "id": "string",
      "latitude": 0.1,
      "longitude": 0.1,
      "postalCode": "string",
      "street": "string"
    },
    "events": [
      {
        "authorId": "string",
        "date": "2019-08-24T14:15:22Z",
        "description": "string",
        "id": "string",
        "type": "CREATE"
      }
    ],
    "expectedDeliveryDate": "2019-08-24T14:15:22Z",
    "id": "string",
    "internalApprovals": [
      {
        "approved": true,
        "by": "string",
        "on": "2019-08-24T14:15:22Z",
        "reason": "string"
      }
    ],
    "internalReview": {
      "approved": true,
      "by": "string",
      "on": "2019-08-24T14:15:22Z",
      "reason": "string"
    },
    "isLocked": true,
    "localizedTotal": 0.1,
    "mailBody": "string",
    "note": "string",
    "pdf": {
      "blobId": "string",
      "created": "2019-08-24T14:15:22Z",
      "extension": "string",
      "fileSize": 0,
      "name": "string",
      "type": "IMAGE"
    },
    "percentageAccepted": 0.1,
    "percentageRejected": 0.1,
    "products": [
      {
        "baseUnitConversion": 0.1,
        "baseUnitQuantity": 0.1,
        "pricePerBaseUnit": 0.1,
        "pricePerUnit": 0.1,
        "productId": "string",
        "quantity": 0.1,
        "totalPrice": 0.1,
        "unit": "string"
      }
    ],
    "rejectedProducts": [
      {
        "batches": [
          {
            "quantity": 0.1,
            "reason": "string"
          }
        ],
        "productId": "string",
        "quantity": 0.1
      }
    ],
    "rejectionReason": "string",
    "sentMails": [
      "string"
    ],
    "shortageProducts": [
      {
        "batches": [
          {
            "quantity": 0.1,
            "reason": "string",
            "resolutions": [
              {
                "glAccountId": "string",
                "id": "string",
                "quantity": 0.1,
                "referenceId": "string",
                "resolvedAt": "2019-08-24T14:15:22Z",
                "resolvedBy": "string",
                "type": "DEBIT_NOTE"
              }
            ],
            "resolvedQuantity": 0.1,
            "unresolvedQuantity": 0.1
          }
        ],
        "productId": "string",
        "quantity": 0.1,
        "resolvedQuantity": 0.1,
        "unresolvedQuantity": 0.1
      }
    ],
    "signature": {
      "blobId": "string",
      "created": "2019-08-24T14:15:22Z",
      "extension": "string",
      "fileSize": 0,
      "name": "string",
      "type": "IMAGE"
    },
    "signedAt": "2019-08-24T14:15:22Z",
    "signedBy": "string",
    "status": "DRAFT",
    "stockSiteId": "string",
    "subsidiaryId": "string",
    "supplierEmail": "string",
    "supplierId": "string",
    "supplierReview": {
      "approved": true,
      "by": "string",
      "on": "2019-08-24T14:15:22Z",
      "reason": "string"
    },
    "tenantId": "string",
    "total": 0.1,
    "updated": "2019-08-24T14:15:22Z",
    "updatedBy": "string"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Find a list of entities by their IDs

GET
/purchase-orders/find-list
AuthorizationBearer <token>

In: header

Query Parameters

ids?array<>

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/purchase-orders/find-list"
[
  {
    "acceptedProducts": [
      {
        "productId": "string",
        "quantity": 0.1
      }
    ],
    "accessTokenHash": "string",
    "actualDeliveryDate": "2019-08-24T14:15:22Z",
    "allowOverdraft": true,
    "amountAccepted": 0.1,
    "amountOfProducts": 0.1,
    "amountRejected": 0.1,
    "approvalRuleSnapshot": {
      "amountThreshold": 0.1,
      "approvalMode": "ANY",
      "approverUserIds": [
        "string"
      ],
      "globalApproverUserIds": [
        "string"
      ],
      "ruleId": "string"
    },
    "attachments": [
      {
        "blobId": "string",
        "created": "2019-08-24T14:15:22Z",
        "extension": "string",
        "fileSize": 0,
        "name": "string",
        "type": "IMAGE"
      }
    ],
    "baseConversionRate": 0.1,
    "cancellationReason": "string",
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "currency": "string",
    "currentLocation": {
      "address": {
        "city": "string",
        "country": "string",
        "houseNumber": "string",
        "id": "string",
        "latitude": 0.1,
        "longitude": 0.1,
        "postalCode": "string",
        "street": "string"
      },
      "coordinate": {
        "latitude": -90,
        "longitude": -180
      },
      "name": "string"
    },
    "deliveryAddress": {
      "city": "string",
      "country": "string",
      "houseNumber": "string",
      "id": "string",
      "latitude": 0.1,
      "longitude": 0.1,
      "postalCode": "string",
      "street": "string"
    },
    "events": [
      {
        "authorId": "string",
        "date": "2019-08-24T14:15:22Z",
        "description": "string",
        "id": "string",
        "type": "CREATE"
      }
    ],
    "expectedDeliveryDate": "2019-08-24T14:15:22Z",
    "id": "string",
    "internalApprovals": [
      {
        "approved": true,
        "by": "string",
        "on": "2019-08-24T14:15:22Z",
        "reason": "string"
      }
    ],
    "internalReview": {
      "approved": true,
      "by": "string",
      "on": "2019-08-24T14:15:22Z",
      "reason": "string"
    },
    "isLocked": true,
    "localizedTotal": 0.1,
    "mailBody": "string",
    "note": "string",
    "pdf": {
      "blobId": "string",
      "created": "2019-08-24T14:15:22Z",
      "extension": "string",
      "fileSize": 0,
      "name": "string",
      "type": "IMAGE"
    },
    "percentageAccepted": 0.1,
    "percentageRejected": 0.1,
    "products": [
      {
        "baseUnitConversion": 0.1,
        "baseUnitQuantity": 0.1,
        "pricePerBaseUnit": 0.1,
        "pricePerUnit": 0.1,
        "productId": "string",
        "quantity": 0.1,
        "totalPrice": 0.1,
        "unit": "string"
      }
    ],
    "rejectedProducts": [
      {
        "batches": [
          {
            "quantity": 0.1,
            "reason": "string"
          }
        ],
        "productId": "string",
        "quantity": 0.1
      }
    ],
    "rejectionReason": "string",
    "sentMails": [
      "string"
    ],
    "shortageProducts": [
      {
        "batches": [
          {
            "quantity": 0.1,
            "reason": "string",
            "resolutions": [
              {
                "glAccountId": "string",
                "id": "string",
                "quantity": 0.1,
                "referenceId": "string",
                "resolvedAt": "2019-08-24T14:15:22Z",
                "resolvedBy": "string",
                "type": "DEBIT_NOTE"
              }
            ],
            "resolvedQuantity": 0.1,
            "unresolvedQuantity": 0.1
          }
        ],
        "productId": "string",
        "quantity": 0.1,
        "resolvedQuantity": 0.1,
        "unresolvedQuantity": 0.1
      }
    ],
    "signature": {
      "blobId": "string",
      "created": "2019-08-24T14:15:22Z",
      "extension": "string",
      "fileSize": 0,
      "name": "string",
      "type": "IMAGE"
    },
    "signedAt": "2019-08-24T14:15:22Z",
    "signedBy": "string",
    "status": "DRAFT",
    "stockSiteId": "string",
    "subsidiaryId": "string",
    "supplierEmail": "string",
    "supplierId": "string",
    "supplierReview": {
      "approved": true,
      "by": "string",
      "on": "2019-08-24T14:15:22Z",
      "reason": "string"
    },
    "tenantId": "string",
    "total": 0.1,
    "updated": "2019-08-24T14:15:22Z",
    "updatedBy": "string"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Find by id in current tenant

GET
/purchase-orders/find/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/purchase-orders/find/string"
{
  "acceptedProducts": [
    {
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "accessTokenHash": "string",
  "actualDeliveryDate": "2019-08-24T14:15:22Z",
  "allowOverdraft": true,
  "amountAccepted": 0.1,
  "amountOfProducts": 0.1,
  "amountRejected": 0.1,
  "approvalRuleSnapshot": {
    "amountThreshold": 0.1,
    "approvalMode": "ANY",
    "approverUserIds": [
      "string"
    ],
    "globalApproverUserIds": [
      "string"
    ],
    "ruleId": "string"
  },
  "attachments": [
    {
      "blobId": "string",
      "created": "2019-08-24T14:15:22Z",
      "extension": "string",
      "fileSize": 0,
      "name": "string",
      "type": "IMAGE"
    }
  ],
  "baseConversionRate": 0.1,
  "cancellationReason": "string",
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "currency": "string",
  "currentLocation": {
    "address": {
      "city": "string",
      "country": "string",
      "houseNumber": "string",
      "id": "string",
      "latitude": 0.1,
      "longitude": 0.1,
      "postalCode": "string",
      "street": "string"
    },
    "coordinate": {
      "latitude": -90,
      "longitude": -180
    },
    "name": "string"
  },
  "deliveryAddress": {
    "city": "string",
    "country": "string",
    "houseNumber": "string",
    "id": "string",
    "latitude": 0.1,
    "longitude": 0.1,
    "postalCode": "string",
    "street": "string"
  },
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedDeliveryDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "internalApprovals": [
    {
      "approved": true,
      "by": "string",
      "on": "2019-08-24T14:15:22Z",
      "reason": "string"
    }
  ],
  "internalReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "isLocked": true,
  "localizedTotal": 0.1,
  "mailBody": "string",
  "note": "string",
  "pdf": {
    "blobId": "string",
    "created": "2019-08-24T14:15:22Z",
    "extension": "string",
    "fileSize": 0,
    "name": "string",
    "type": "IMAGE"
  },
  "percentageAccepted": 0.1,
  "percentageRejected": 0.1,
  "products": [
    {
      "baseUnitConversion": 0.1,
      "baseUnitQuantity": 0.1,
      "pricePerBaseUnit": 0.1,
      "pricePerUnit": 0.1,
      "productId": "string",
      "quantity": 0.1,
      "totalPrice": 0.1,
      "unit": "string"
    }
  ],
  "rejectedProducts": [
    {
      "batches": [
        {
          "quantity": 0.1,
          "reason": "string"
        }
      ],
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "rejectionReason": "string",
  "sentMails": [
    "string"
  ],
  "shortageProducts": [
    {
      "batches": [
        {
          "quantity": 0.1,
          "reason": "string",
          "resolutions": [
            {
              "glAccountId": "string",
              "id": "string",
              "quantity": 0.1,
              "referenceId": "string",
              "resolvedAt": "2019-08-24T14:15:22Z",
              "resolvedBy": "string",
              "type": "DEBIT_NOTE"
            }
          ],
          "resolvedQuantity": 0.1,
          "unresolvedQuantity": 0.1
        }
      ],
      "productId": "string",
      "quantity": 0.1,
      "resolvedQuantity": 0.1,
      "unresolvedQuantity": 0.1
    }
  ],
  "signature": {
    "blobId": "string",
    "created": "2019-08-24T14:15:22Z",
    "extension": "string",
    "fileSize": 0,
    "name": "string",
    "type": "IMAGE"
  },
  "signedAt": "2019-08-24T14:15:22Z",
  "signedBy": "string",
  "status": "DRAFT",
  "stockSiteId": "string",
  "subsidiaryId": "string",
  "supplierEmail": "string",
  "supplierId": "string",
  "supplierReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "tenantId": "string",
  "total": 0.1,
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get page by page number and size with optional sorting based on field to sortBy and direction

GET
/purchase-orders/page
AuthorizationBearer <token>

In: header

Query Parameters

pageNumber?integer
Formatint32
pageSize?integer
Formatint32
sortBy?string
direction?string
Value in"ASC" | "DESC"
search?string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/purchase-orders/page"
{
  "content": [
    {
      "acceptedProducts": [
        {
          "productId": "string",
          "quantity": 0.1
        }
      ],
      "accessTokenHash": "string",
      "actualDeliveryDate": "2019-08-24T14:15:22Z",
      "allowOverdraft": true,
      "amountAccepted": 0.1,
      "amountOfProducts": 0.1,
      "amountRejected": 0.1,
      "approvalRuleSnapshot": {
        "amountThreshold": 0.1,
        "approvalMode": "ANY",
        "approverUserIds": [
          "string"
        ],
        "globalApproverUserIds": [
          "string"
        ],
        "ruleId": "string"
      },
      "attachments": [
        {
          "blobId": "string",
          "created": "2019-08-24T14:15:22Z",
          "extension": "string",
          "fileSize": 0,
          "name": "string",
          "type": "IMAGE"
        }
      ],
      "baseConversionRate": 0.1,
      "cancellationReason": "string",
      "created": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "currency": "string",
      "currentLocation": {
        "address": {
          "city": "string",
          "country": "string",
          "houseNumber": "string",
          "id": "string",
          "latitude": 0.1,
          "longitude": 0.1,
          "postalCode": "string",
          "street": "string"
        },
        "coordinate": {
          "latitude": -90,
          "longitude": -180
        },
        "name": "string"
      },
      "deliveryAddress": {
        "city": "string",
        "country": "string",
        "houseNumber": "string",
        "id": "string",
        "latitude": 0.1,
        "longitude": 0.1,
        "postalCode": "string",
        "street": "string"
      },
      "events": [
        {
          "authorId": "string",
          "date": "2019-08-24T14:15:22Z",
          "description": "string",
          "id": "string",
          "type": "CREATE"
        }
      ],
      "expectedDeliveryDate": "2019-08-24T14:15:22Z",
      "id": "string",
      "internalApprovals": [
        {
          "approved": true,
          "by": "string",
          "on": "2019-08-24T14:15:22Z",
          "reason": "string"
        }
      ],
      "internalReview": {
        "approved": true,
        "by": "string",
        "on": "2019-08-24T14:15:22Z",
        "reason": "string"
      },
      "isLocked": true,
      "localizedTotal": 0.1,
      "mailBody": "string",
      "note": "string",
      "pdf": {
        "blobId": "string",
        "created": "2019-08-24T14:15:22Z",
        "extension": "string",
        "fileSize": 0,
        "name": "string",
        "type": "IMAGE"
      },
      "percentageAccepted": 0.1,
      "percentageRejected": 0.1,
      "products": [
        {
          "baseUnitConversion": 0.1,
          "baseUnitQuantity": 0.1,
          "pricePerBaseUnit": 0.1,
          "pricePerUnit": 0.1,
          "productId": "string",
          "quantity": 0.1,
          "totalPrice": 0.1,
          "unit": "string"
        }
      ],
      "rejectedProducts": [
        {
          "batches": [
            {
              "quantity": 0.1,
              "reason": "string"
            }
          ],
          "productId": "string",
          "quantity": 0.1
        }
      ],
      "rejectionReason": "string",
      "sentMails": [
        "string"
      ],
      "shortageProducts": [
        {
          "batches": [
            {
              "quantity": 0.1,
              "reason": "string",
              "resolutions": [
                {
                  "glAccountId": "string",
                  "id": "string",
                  "quantity": 0.1,
                  "referenceId": "string",
                  "resolvedAt": "2019-08-24T14:15:22Z",
                  "resolvedBy": "string",
                  "type": "DEBIT_NOTE"
                }
              ],
              "resolvedQuantity": 0.1,
              "unresolvedQuantity": 0.1
            }
          ],
          "productId": "string",
          "quantity": 0.1,
          "resolvedQuantity": 0.1,
          "unresolvedQuantity": 0.1
        }
      ],
      "signature": {
        "blobId": "string",
        "created": "2019-08-24T14:15:22Z",
        "extension": "string",
        "fileSize": 0,
        "name": "string",
        "type": "IMAGE"
      },
      "signedAt": "2019-08-24T14:15:22Z",
      "signedBy": "string",
      "status": "DRAFT",
      "stockSiteId": "string",
      "subsidiaryId": "string",
      "supplierEmail": "string",
      "supplierId": "string",
      "supplierReview": {
        "approved": true,
        "by": "string",
        "on": "2019-08-24T14:15:22Z",
        "reason": "string"
      },
      "tenantId": "string",
      "total": 0.1,
      "updated": "2019-08-24T14:15:22Z",
      "updatedBy": "string"
    }
  ],
  "empty": true,
  "first": true,
  "last": true,
  "number": 0,
  "numberOfElements": 0,
  "pageable": {
    "offset": 0,
    "pageNumber": 0,
    "pageSize": 0,
    "paged": true,
    "sort": {
      "empty": true,
      "sorted": true,
      "unsorted": true
    },
    "unpaged": true
  },
  "size": 0,
  "sort": {
    "empty": true,
    "sorted": true,
    "unsorted": true
  },
  "totalElements": 0,
  "totalPages": 0
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get purchase order stats

GET
/purchase-orders/stats
AuthorizationBearer <token>

In: header

Query Parameters

subsidiaryId?string
stockSiteId?string
start?string
Formatdate-time
end?string
Formatdate-time

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/purchase-orders/stats"
{
  "averageValue": 0.1,
  "numberByStatus": {
    "property1": 0,
    "property2": 0
  },
  "totalOrders": 0,
  "totalValue": 0.1
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Updates an order

PATCH
/purchase-orders/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "http://localhost:18080/api/v1/purchase-orders/string" \  -H "Content-Type: application/json" \  -d '{    "products": [      {        "price": 0.1,        "productId": "string",        "quantity": 0.1,        "unit": "string"      }    ],    "subsidiaryId": "string"  }'
{
  "acceptedProducts": [
    {
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "actualDeliveryDate": "2019-08-24T14:15:22Z",
  "allowOverdraft": true,
  "amountUsed": 0.1,
  "approvalRuleSnapshot": {
    "amountThreshold": 0.1,
    "approvalMode": "ANY",
    "approverUserIds": [
      "string"
    ],
    "globalApproverUserIds": [
      "string"
    ],
    "ruleId": "string"
  },
  "attachments": [
    {
      "blobId": "string",
      "created": "2019-08-24T14:15:22Z",
      "extension": "string",
      "fileSize": 0,
      "name": "string",
      "type": "IMAGE"
    }
  ],
  "baseConversionRate": 0.1,
  "cancellationReason": "string",
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "currency": "string",
  "currentLocation": {
    "address": {
      "city": "string",
      "country": "string",
      "houseNumber": "string",
      "id": "string",
      "latitude": 0.1,
      "longitude": 0.1,
      "postalCode": "string",
      "street": "string"
    },
    "coordinate": {
      "latitude": -90,
      "longitude": -180
    },
    "name": "string"
  },
  "deliveryAddress": {
    "city": "string",
    "country": "string",
    "houseNumber": "string",
    "id": "string",
    "latitude": 0.1,
    "longitude": 0.1,
    "postalCode": "string",
    "street": "string"
  },
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedDeliveryDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "internalApprovals": [
    {
      "approved": true,
      "by": "string",
      "on": "2019-08-24T14:15:22Z",
      "reason": "string"
    }
  ],
  "internalReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "mailBody": "string",
  "note": "string",
  "pdf": {
    "blobId": "string",
    "created": "2019-08-24T14:15:22Z",
    "extension": "string",
    "fileSize": 0,
    "name": "string",
    "type": "IMAGE"
  },
  "percentageUsed": 0.1,
  "productStatus": [
    {
      "amountLeft": 0.1,
      "percentagePending": 0.1,
      "percentageReceived": 0.1,
      "percentageRejected": 0.1,
      "productId": "string",
      "quantityAccepted": 0.1,
      "quantityRejected": 0.1,
      "totalQuantity": 0.1,
      "unitPrice": 0.1
    }
  ],
  "products": [
    {
      "baseUnitConversion": 0.1,
      "baseUnitQuantity": 0.1,
      "canReceive": true,
      "currency": "string",
      "imageAssets": [
        {
          "blobId": "string",
          "created": "2019-08-24T14:15:22Z",
          "extension": "string",
          "fileSize": 0,
          "name": "string",
          "type": "IMAGE"
        }
      ],
      "price": 0.1,
      "pricePerBaseUnit": 0.1,
      "productId": "string",
      "productName": "string",
      "quantity": 0.1,
      "sourceLocationId": "string",
      "totalPrice": 0.1,
      "unit": "string",
      "unitsOfMeasurement": [
        {
          "baseUnit": true,
          "cost": 0.1,
          "decimal": true,
          "isBaseUnit": true,
          "isDecimal": true,
          "name": "string",
          "quantity": 0.1,
          "salesPrice": 0.1,
          "unit": "string"
        }
      ]
    }
  ],
  "rejectedProducts": [
    {
      "batches": [
        {
          "quantity": 0.1,
          "reason": "string"
        }
      ],
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "rejectionReason": "string",
  "sentMails": [
    "string"
  ],
  "status": "DRAFT",
  "stockSiteId": "string",
  "subsidiaryId": "string",
  "supplierEmail": "string",
  "supplierId": "string",
  "supplierReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "tenantId": "string",
  "total": 0.1,
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Delete by id in current tenant

DELETE
/purchase-orders/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

curl -X DELETE "http://localhost:18080/api/v1/purchase-orders/string"
Empty
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Approve an order internally

PATCH
/purchase-orders/{id}/approve-internal
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "http://localhost:18080/api/v1/purchase-orders/string/approve-internal"
{
  "acceptedProducts": [
    {
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "actualDeliveryDate": "2019-08-24T14:15:22Z",
  "allowOverdraft": true,
  "amountUsed": 0.1,
  "approvalRuleSnapshot": {
    "amountThreshold": 0.1,
    "approvalMode": "ANY",
    "approverUserIds": [
      "string"
    ],
    "globalApproverUserIds": [
      "string"
    ],
    "ruleId": "string"
  },
  "attachments": [
    {
      "blobId": "string",
      "created": "2019-08-24T14:15:22Z",
      "extension": "string",
      "fileSize": 0,
      "name": "string",
      "type": "IMAGE"
    }
  ],
  "baseConversionRate": 0.1,
  "cancellationReason": "string",
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "currency": "string",
  "currentLocation": {
    "address": {
      "city": "string",
      "country": "string",
      "houseNumber": "string",
      "id": "string",
      "latitude": 0.1,
      "longitude": 0.1,
      "postalCode": "string",
      "street": "string"
    },
    "coordinate": {
      "latitude": -90,
      "longitude": -180
    },
    "name": "string"
  },
  "deliveryAddress": {
    "city": "string",
    "country": "string",
    "houseNumber": "string",
    "id": "string",
    "latitude": 0.1,
    "longitude": 0.1,
    "postalCode": "string",
    "street": "string"
  },
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedDeliveryDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "internalApprovals": [
    {
      "approved": true,
      "by": "string",
      "on": "2019-08-24T14:15:22Z",
      "reason": "string"
    }
  ],
  "internalReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "mailBody": "string",
  "note": "string",
  "pdf": {
    "blobId": "string",
    "created": "2019-08-24T14:15:22Z",
    "extension": "string",
    "fileSize": 0,
    "name": "string",
    "type": "IMAGE"
  },
  "percentageUsed": 0.1,
  "productStatus": [
    {
      "amountLeft": 0.1,
      "percentagePending": 0.1,
      "percentageReceived": 0.1,
      "percentageRejected": 0.1,
      "productId": "string",
      "quantityAccepted": 0.1,
      "quantityRejected": 0.1,
      "totalQuantity": 0.1,
      "unitPrice": 0.1
    }
  ],
  "products": [
    {
      "baseUnitConversion": 0.1,
      "baseUnitQuantity": 0.1,
      "canReceive": true,
      "currency": "string",
      "imageAssets": [
        {
          "blobId": "string",
          "created": "2019-08-24T14:15:22Z",
          "extension": "string",
          "fileSize": 0,
          "name": "string",
          "type": "IMAGE"
        }
      ],
      "price": 0.1,
      "pricePerBaseUnit": 0.1,
      "productId": "string",
      "productName": "string",
      "quantity": 0.1,
      "sourceLocationId": "string",
      "totalPrice": 0.1,
      "unit": "string",
      "unitsOfMeasurement": [
        {
          "baseUnit": true,
          "cost": 0.1,
          "decimal": true,
          "isBaseUnit": true,
          "isDecimal": true,
          "name": "string",
          "quantity": 0.1,
          "salesPrice": 0.1,
          "unit": "string"
        }
      ]
    }
  ],
  "rejectedProducts": [
    {
      "batches": [
        {
          "quantity": 0.1,
          "reason": "string"
        }
      ],
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "rejectionReason": "string",
  "sentMails": [
    "string"
  ],
  "status": "DRAFT",
  "stockSiteId": "string",
  "subsidiaryId": "string",
  "supplierEmail": "string",
  "supplierId": "string",
  "supplierReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "tenantId": "string",
  "total": 0.1,
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Approve an order by supplier

PATCH
/purchase-orders/{id}/approve-supplier
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "http://localhost:18080/api/v1/purchase-orders/string/approve-supplier"
{
  "acceptedProducts": [
    {
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "actualDeliveryDate": "2019-08-24T14:15:22Z",
  "allowOverdraft": true,
  "amountUsed": 0.1,
  "approvalRuleSnapshot": {
    "amountThreshold": 0.1,
    "approvalMode": "ANY",
    "approverUserIds": [
      "string"
    ],
    "globalApproverUserIds": [
      "string"
    ],
    "ruleId": "string"
  },
  "attachments": [
    {
      "blobId": "string",
      "created": "2019-08-24T14:15:22Z",
      "extension": "string",
      "fileSize": 0,
      "name": "string",
      "type": "IMAGE"
    }
  ],
  "baseConversionRate": 0.1,
  "cancellationReason": "string",
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "currency": "string",
  "currentLocation": {
    "address": {
      "city": "string",
      "country": "string",
      "houseNumber": "string",
      "id": "string",
      "latitude": 0.1,
      "longitude": 0.1,
      "postalCode": "string",
      "street": "string"
    },
    "coordinate": {
      "latitude": -90,
      "longitude": -180
    },
    "name": "string"
  },
  "deliveryAddress": {
    "city": "string",
    "country": "string",
    "houseNumber": "string",
    "id": "string",
    "latitude": 0.1,
    "longitude": 0.1,
    "postalCode": "string",
    "street": "string"
  },
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedDeliveryDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "internalApprovals": [
    {
      "approved": true,
      "by": "string",
      "on": "2019-08-24T14:15:22Z",
      "reason": "string"
    }
  ],
  "internalReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "mailBody": "string",
  "note": "string",
  "pdf": {
    "blobId": "string",
    "created": "2019-08-24T14:15:22Z",
    "extension": "string",
    "fileSize": 0,
    "name": "string",
    "type": "IMAGE"
  },
  "percentageUsed": 0.1,
  "productStatus": [
    {
      "amountLeft": 0.1,
      "percentagePending": 0.1,
      "percentageReceived": 0.1,
      "percentageRejected": 0.1,
      "productId": "string",
      "quantityAccepted": 0.1,
      "quantityRejected": 0.1,
      "totalQuantity": 0.1,
      "unitPrice": 0.1
    }
  ],
  "products": [
    {
      "baseUnitConversion": 0.1,
      "baseUnitQuantity": 0.1,
      "canReceive": true,
      "currency": "string",
      "imageAssets": [
        {
          "blobId": "string",
          "created": "2019-08-24T14:15:22Z",
          "extension": "string",
          "fileSize": 0,
          "name": "string",
          "type": "IMAGE"
        }
      ],
      "price": 0.1,
      "pricePerBaseUnit": 0.1,
      "productId": "string",
      "productName": "string",
      "quantity": 0.1,
      "sourceLocationId": "string",
      "totalPrice": 0.1,
      "unit": "string",
      "unitsOfMeasurement": [
        {
          "baseUnit": true,
          "cost": 0.1,
          "decimal": true,
          "isBaseUnit": true,
          "isDecimal": true,
          "name": "string",
          "quantity": 0.1,
          "salesPrice": 0.1,
          "unit": "string"
        }
      ]
    }
  ],
  "rejectedProducts": [
    {
      "batches": [
        {
          "quantity": 0.1,
          "reason": "string"
        }
      ],
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "rejectionReason": "string",
  "sentMails": [
    "string"
  ],
  "status": "DRAFT",
  "stockSiteId": "string",
  "subsidiaryId": "string",
  "supplierEmail": "string",
  "supplierId": "string",
  "supplierReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "tenantId": "string",
  "total": 0.1,
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Delete an attachment from a purchase order

DELETE
/purchase-orders/{id}/attachments/{blobId}
AuthorizationBearer <token>

In: header

Path Parameters

id*string
blobId*string

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "http://localhost:18080/api/v1/purchase-orders/string/attachments/string"
{
  "acceptedProducts": [
    {
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "actualDeliveryDate": "2019-08-24T14:15:22Z",
  "allowOverdraft": true,
  "amountUsed": 0.1,
  "approvalRuleSnapshot": {
    "amountThreshold": 0.1,
    "approvalMode": "ANY",
    "approverUserIds": [
      "string"
    ],
    "globalApproverUserIds": [
      "string"
    ],
    "ruleId": "string"
  },
  "attachments": [
    {
      "blobId": "string",
      "created": "2019-08-24T14:15:22Z",
      "extension": "string",
      "fileSize": 0,
      "name": "string",
      "type": "IMAGE"
    }
  ],
  "baseConversionRate": 0.1,
  "cancellationReason": "string",
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "currency": "string",
  "currentLocation": {
    "address": {
      "city": "string",
      "country": "string",
      "houseNumber": "string",
      "id": "string",
      "latitude": 0.1,
      "longitude": 0.1,
      "postalCode": "string",
      "street": "string"
    },
    "coordinate": {
      "latitude": -90,
      "longitude": -180
    },
    "name": "string"
  },
  "deliveryAddress": {
    "city": "string",
    "country": "string",
    "houseNumber": "string",
    "id": "string",
    "latitude": 0.1,
    "longitude": 0.1,
    "postalCode": "string",
    "street": "string"
  },
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedDeliveryDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "internalApprovals": [
    {
      "approved": true,
      "by": "string",
      "on": "2019-08-24T14:15:22Z",
      "reason": "string"
    }
  ],
  "internalReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "mailBody": "string",
  "note": "string",
  "pdf": {
    "blobId": "string",
    "created": "2019-08-24T14:15:22Z",
    "extension": "string",
    "fileSize": 0,
    "name": "string",
    "type": "IMAGE"
  },
  "percentageUsed": 0.1,
  "productStatus": [
    {
      "amountLeft": 0.1,
      "percentagePending": 0.1,
      "percentageReceived": 0.1,
      "percentageRejected": 0.1,
      "productId": "string",
      "quantityAccepted": 0.1,
      "quantityRejected": 0.1,
      "totalQuantity": 0.1,
      "unitPrice": 0.1
    }
  ],
  "products": [
    {
      "baseUnitConversion": 0.1,
      "baseUnitQuantity": 0.1,
      "canReceive": true,
      "currency": "string",
      "imageAssets": [
        {
          "blobId": "string",
          "created": "2019-08-24T14:15:22Z",
          "extension": "string",
          "fileSize": 0,
          "name": "string",
          "type": "IMAGE"
        }
      ],
      "price": 0.1,
      "pricePerBaseUnit": 0.1,
      "productId": "string",
      "productName": "string",
      "quantity": 0.1,
      "sourceLocationId": "string",
      "totalPrice": 0.1,
      "unit": "string",
      "unitsOfMeasurement": [
        {
          "baseUnit": true,
          "cost": 0.1,
          "decimal": true,
          "isBaseUnit": true,
          "isDecimal": true,
          "name": "string",
          "quantity": 0.1,
          "salesPrice": 0.1,
          "unit": "string"
        }
      ]
    }
  ],
  "rejectedProducts": [
    {
      "batches": [
        {
          "quantity": 0.1,
          "reason": "string"
        }
      ],
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "rejectionReason": "string",
  "sentMails": [
    "string"
  ],
  "status": "DRAFT",
  "stockSiteId": "string",
  "subsidiaryId": "string",
  "supplierEmail": "string",
  "supplierId": "string",
  "supplierReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "tenantId": "string",
  "total": 0.1,
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Cancel an order

PATCH
/purchase-orders/{id}/cancel
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body?string

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "http://localhost:18080/api/v1/purchase-orders/string/cancel" \  -H "Content-Type: application/json" \  -d 'string'
{
  "acceptedProducts": [
    {
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "actualDeliveryDate": "2019-08-24T14:15:22Z",
  "allowOverdraft": true,
  "amountUsed": 0.1,
  "approvalRuleSnapshot": {
    "amountThreshold": 0.1,
    "approvalMode": "ANY",
    "approverUserIds": [
      "string"
    ],
    "globalApproverUserIds": [
      "string"
    ],
    "ruleId": "string"
  },
  "attachments": [
    {
      "blobId": "string",
      "created": "2019-08-24T14:15:22Z",
      "extension": "string",
      "fileSize": 0,
      "name": "string",
      "type": "IMAGE"
    }
  ],
  "baseConversionRate": 0.1,
  "cancellationReason": "string",
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "currency": "string",
  "currentLocation": {
    "address": {
      "city": "string",
      "country": "string",
      "houseNumber": "string",
      "id": "string",
      "latitude": 0.1,
      "longitude": 0.1,
      "postalCode": "string",
      "street": "string"
    },
    "coordinate": {
      "latitude": -90,
      "longitude": -180
    },
    "name": "string"
  },
  "deliveryAddress": {
    "city": "string",
    "country": "string",
    "houseNumber": "string",
    "id": "string",
    "latitude": 0.1,
    "longitude": 0.1,
    "postalCode": "string",
    "street": "string"
  },
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedDeliveryDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "internalApprovals": [
    {
      "approved": true,
      "by": "string",
      "on": "2019-08-24T14:15:22Z",
      "reason": "string"
    }
  ],
  "internalReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "mailBody": "string",
  "note": "string",
  "pdf": {
    "blobId": "string",
    "created": "2019-08-24T14:15:22Z",
    "extension": "string",
    "fileSize": 0,
    "name": "string",
    "type": "IMAGE"
  },
  "percentageUsed": 0.1,
  "productStatus": [
    {
      "amountLeft": 0.1,
      "percentagePending": 0.1,
      "percentageReceived": 0.1,
      "percentageRejected": 0.1,
      "productId": "string",
      "quantityAccepted": 0.1,
      "quantityRejected": 0.1,
      "totalQuantity": 0.1,
      "unitPrice": 0.1
    }
  ],
  "products": [
    {
      "baseUnitConversion": 0.1,
      "baseUnitQuantity": 0.1,
      "canReceive": true,
      "currency": "string",
      "imageAssets": [
        {
          "blobId": "string",
          "created": "2019-08-24T14:15:22Z",
          "extension": "string",
          "fileSize": 0,
          "name": "string",
          "type": "IMAGE"
        }
      ],
      "price": 0.1,
      "pricePerBaseUnit": 0.1,
      "productId": "string",
      "productName": "string",
      "quantity": 0.1,
      "sourceLocationId": "string",
      "totalPrice": 0.1,
      "unit": "string",
      "unitsOfMeasurement": [
        {
          "baseUnit": true,
          "cost": 0.1,
          "decimal": true,
          "isBaseUnit": true,
          "isDecimal": true,
          "name": "string",
          "quantity": 0.1,
          "salesPrice": 0.1,
          "unit": "string"
        }
      ]
    }
  ],
  "rejectedProducts": [
    {
      "batches": [
        {
          "quantity": 0.1,
          "reason": "string"
        }
      ],
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "rejectionReason": "string",
  "sentMails": [
    "string"
  ],
  "status": "DRAFT",
  "stockSiteId": "string",
  "subsidiaryId": "string",
  "supplierEmail": "string",
  "supplierId": "string",
  "supplierReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "tenantId": "string",
  "total": 0.1,
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Close an order

PATCH
/purchase-orders/{id}/close
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "http://localhost:18080/api/v1/purchase-orders/string/close"
{
  "acceptedProducts": [
    {
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "actualDeliveryDate": "2019-08-24T14:15:22Z",
  "allowOverdraft": true,
  "amountUsed": 0.1,
  "approvalRuleSnapshot": {
    "amountThreshold": 0.1,
    "approvalMode": "ANY",
    "approverUserIds": [
      "string"
    ],
    "globalApproverUserIds": [
      "string"
    ],
    "ruleId": "string"
  },
  "attachments": [
    {
      "blobId": "string",
      "created": "2019-08-24T14:15:22Z",
      "extension": "string",
      "fileSize": 0,
      "name": "string",
      "type": "IMAGE"
    }
  ],
  "baseConversionRate": 0.1,
  "cancellationReason": "string",
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "currency": "string",
  "currentLocation": {
    "address": {
      "city": "string",
      "country": "string",
      "houseNumber": "string",
      "id": "string",
      "latitude": 0.1,
      "longitude": 0.1,
      "postalCode": "string",
      "street": "string"
    },
    "coordinate": {
      "latitude": -90,
      "longitude": -180
    },
    "name": "string"
  },
  "deliveryAddress": {
    "city": "string",
    "country": "string",
    "houseNumber": "string",
    "id": "string",
    "latitude": 0.1,
    "longitude": 0.1,
    "postalCode": "string",
    "street": "string"
  },
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedDeliveryDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "internalApprovals": [
    {
      "approved": true,
      "by": "string",
      "on": "2019-08-24T14:15:22Z",
      "reason": "string"
    }
  ],
  "internalReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "mailBody": "string",
  "note": "string",
  "pdf": {
    "blobId": "string",
    "created": "2019-08-24T14:15:22Z",
    "extension": "string",
    "fileSize": 0,
    "name": "string",
    "type": "IMAGE"
  },
  "percentageUsed": 0.1,
  "productStatus": [
    {
      "amountLeft": 0.1,
      "percentagePending": 0.1,
      "percentageReceived": 0.1,
      "percentageRejected": 0.1,
      "productId": "string",
      "quantityAccepted": 0.1,
      "quantityRejected": 0.1,
      "totalQuantity": 0.1,
      "unitPrice": 0.1
    }
  ],
  "products": [
    {
      "baseUnitConversion": 0.1,
      "baseUnitQuantity": 0.1,
      "canReceive": true,
      "currency": "string",
      "imageAssets": [
        {
          "blobId": "string",
          "created": "2019-08-24T14:15:22Z",
          "extension": "string",
          "fileSize": 0,
          "name": "string",
          "type": "IMAGE"
        }
      ],
      "price": 0.1,
      "pricePerBaseUnit": 0.1,
      "productId": "string",
      "productName": "string",
      "quantity": 0.1,
      "sourceLocationId": "string",
      "totalPrice": 0.1,
      "unit": "string",
      "unitsOfMeasurement": [
        {
          "baseUnit": true,
          "cost": 0.1,
          "decimal": true,
          "isBaseUnit": true,
          "isDecimal": true,
          "name": "string",
          "quantity": 0.1,
          "salesPrice": 0.1,
          "unit": "string"
        }
      ]
    }
  ],
  "rejectedProducts": [
    {
      "batches": [
        {
          "quantity": 0.1,
          "reason": "string"
        }
      ],
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "rejectionReason": "string",
  "sentMails": [
    "string"
  ],
  "status": "DRAFT",
  "stockSiteId": "string",
  "subsidiaryId": "string",
  "supplierEmail": "string",
  "supplierId": "string",
  "supplierReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "tenantId": "string",
  "total": 0.1,
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Add a comment to an entity

POST
/purchase-orders/{id}/comment
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*string

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/purchase-orders/string/comment" \  -H "Content-Type: application/json" \  -d 'string'
{
  "acceptedProducts": [
    {
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "actualDeliveryDate": "2019-08-24T14:15:22Z",
  "allowOverdraft": true,
  "amountUsed": 0.1,
  "approvalRuleSnapshot": {
    "amountThreshold": 0.1,
    "approvalMode": "ANY",
    "approverUserIds": [
      "string"
    ],
    "globalApproverUserIds": [
      "string"
    ],
    "ruleId": "string"
  },
  "attachments": [
    {
      "blobId": "string",
      "created": "2019-08-24T14:15:22Z",
      "extension": "string",
      "fileSize": 0,
      "name": "string",
      "type": "IMAGE"
    }
  ],
  "baseConversionRate": 0.1,
  "cancellationReason": "string",
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "currency": "string",
  "currentLocation": {
    "address": {
      "city": "string",
      "country": "string",
      "houseNumber": "string",
      "id": "string",
      "latitude": 0.1,
      "longitude": 0.1,
      "postalCode": "string",
      "street": "string"
    },
    "coordinate": {
      "latitude": -90,
      "longitude": -180
    },
    "name": "string"
  },
  "deliveryAddress": {
    "city": "string",
    "country": "string",
    "houseNumber": "string",
    "id": "string",
    "latitude": 0.1,
    "longitude": 0.1,
    "postalCode": "string",
    "street": "string"
  },
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedDeliveryDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "internalApprovals": [
    {
      "approved": true,
      "by": "string",
      "on": "2019-08-24T14:15:22Z",
      "reason": "string"
    }
  ],
  "internalReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "mailBody": "string",
  "note": "string",
  "pdf": {
    "blobId": "string",
    "created": "2019-08-24T14:15:22Z",
    "extension": "string",
    "fileSize": 0,
    "name": "string",
    "type": "IMAGE"
  },
  "percentageUsed": 0.1,
  "productStatus": [
    {
      "amountLeft": 0.1,
      "percentagePending": 0.1,
      "percentageReceived": 0.1,
      "percentageRejected": 0.1,
      "productId": "string",
      "quantityAccepted": 0.1,
      "quantityRejected": 0.1,
      "totalQuantity": 0.1,
      "unitPrice": 0.1
    }
  ],
  "products": [
    {
      "baseUnitConversion": 0.1,
      "baseUnitQuantity": 0.1,
      "canReceive": true,
      "currency": "string",
      "imageAssets": [
        {
          "blobId": "string",
          "created": "2019-08-24T14:15:22Z",
          "extension": "string",
          "fileSize": 0,
          "name": "string",
          "type": "IMAGE"
        }
      ],
      "price": 0.1,
      "pricePerBaseUnit": 0.1,
      "productId": "string",
      "productName": "string",
      "quantity": 0.1,
      "sourceLocationId": "string",
      "totalPrice": 0.1,
      "unit": "string",
      "unitsOfMeasurement": [
        {
          "baseUnit": true,
          "cost": 0.1,
          "decimal": true,
          "isBaseUnit": true,
          "isDecimal": true,
          "name": "string",
          "quantity": 0.1,
          "salesPrice": 0.1,
          "unit": "string"
        }
      ]
    }
  ],
  "rejectedProducts": [
    {
      "batches": [
        {
          "quantity": 0.1,
          "reason": "string"
        }
      ],
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "rejectionReason": "string",
  "sentMails": [
    "string"
  ],
  "status": "DRAFT",
  "stockSiteId": "string",
  "subsidiaryId": "string",
  "supplierEmail": "string",
  "supplierId": "string",
  "supplierReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "tenantId": "string",
  "total": 0.1,
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get an enriched order

GET
/purchase-orders/{id}/enriched
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/purchase-orders/string/enriched"
{
  "acceptedProducts": [
    {
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "actualDeliveryDate": "2019-08-24T14:15:22Z",
  "allowOverdraft": true,
  "amountUsed": 0.1,
  "approvalRuleSnapshot": {
    "amountThreshold": 0.1,
    "approvalMode": "ANY",
    "approverUserIds": [
      "string"
    ],
    "globalApproverUserIds": [
      "string"
    ],
    "ruleId": "string"
  },
  "attachments": [
    {
      "blobId": "string",
      "created": "2019-08-24T14:15:22Z",
      "extension": "string",
      "fileSize": 0,
      "name": "string",
      "type": "IMAGE"
    }
  ],
  "baseConversionRate": 0.1,
  "cancellationReason": "string",
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "currency": "string",
  "currentLocation": {
    "address": {
      "city": "string",
      "country": "string",
      "houseNumber": "string",
      "id": "string",
      "latitude": 0.1,
      "longitude": 0.1,
      "postalCode": "string",
      "street": "string"
    },
    "coordinate": {
      "latitude": -90,
      "longitude": -180
    },
    "name": "string"
  },
  "deliveryAddress": {
    "city": "string",
    "country": "string",
    "houseNumber": "string",
    "id": "string",
    "latitude": 0.1,
    "longitude": 0.1,
    "postalCode": "string",
    "street": "string"
  },
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedDeliveryDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "internalApprovals": [
    {
      "approved": true,
      "by": "string",
      "on": "2019-08-24T14:15:22Z",
      "reason": "string"
    }
  ],
  "internalReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "mailBody": "string",
  "note": "string",
  "pdf": {
    "blobId": "string",
    "created": "2019-08-24T14:15:22Z",
    "extension": "string",
    "fileSize": 0,
    "name": "string",
    "type": "IMAGE"
  },
  "percentageUsed": 0.1,
  "productStatus": [
    {
      "amountLeft": 0.1,
      "percentagePending": 0.1,
      "percentageReceived": 0.1,
      "percentageRejected": 0.1,
      "productId": "string",
      "quantityAccepted": 0.1,
      "quantityRejected": 0.1,
      "totalQuantity": 0.1,
      "unitPrice": 0.1
    }
  ],
  "products": [
    {
      "baseUnitConversion": 0.1,
      "baseUnitQuantity": 0.1,
      "canReceive": true,
      "currency": "string",
      "imageAssets": [
        {
          "blobId": "string",
          "created": "2019-08-24T14:15:22Z",
          "extension": "string",
          "fileSize": 0,
          "name": "string",
          "type": "IMAGE"
        }
      ],
      "price": 0.1,
      "pricePerBaseUnit": 0.1,
      "productId": "string",
      "productName": "string",
      "quantity": 0.1,
      "sourceLocationId": "string",
      "totalPrice": 0.1,
      "unit": "string",
      "unitsOfMeasurement": [
        {
          "baseUnit": true,
          "cost": 0.1,
          "decimal": true,
          "isBaseUnit": true,
          "isDecimal": true,
          "name": "string",
          "quantity": 0.1,
          "salesPrice": 0.1,
          "unit": "string"
        }
      ]
    }
  ],
  "rejectedProducts": [
    {
      "batches": [
        {
          "quantity": 0.1,
          "reason": "string"
        }
      ],
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "rejectionReason": "string",
  "sentMails": [
    "string"
  ],
  "status": "DRAFT",
  "stockSiteId": "string",
  "subsidiaryId": "string",
  "supplierEmail": "string",
  "supplierId": "string",
  "supplierReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "tenantId": "string",
  "total": 0.1,
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Mark purchase order as sent

POST
/purchase-orders/{id}/mark-as-sent
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/purchase-orders/string/mark-as-sent" \  -F pdf="string"
{
  "acceptedProducts": [
    {
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "actualDeliveryDate": "2019-08-24T14:15:22Z",
  "allowOverdraft": true,
  "amountUsed": 0.1,
  "approvalRuleSnapshot": {
    "amountThreshold": 0.1,
    "approvalMode": "ANY",
    "approverUserIds": [
      "string"
    ],
    "globalApproverUserIds": [
      "string"
    ],
    "ruleId": "string"
  },
  "attachments": [
    {
      "blobId": "string",
      "created": "2019-08-24T14:15:22Z",
      "extension": "string",
      "fileSize": 0,
      "name": "string",
      "type": "IMAGE"
    }
  ],
  "baseConversionRate": 0.1,
  "cancellationReason": "string",
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "currency": "string",
  "currentLocation": {
    "address": {
      "city": "string",
      "country": "string",
      "houseNumber": "string",
      "id": "string",
      "latitude": 0.1,
      "longitude": 0.1,
      "postalCode": "string",
      "street": "string"
    },
    "coordinate": {
      "latitude": -90,
      "longitude": -180
    },
    "name": "string"
  },
  "deliveryAddress": {
    "city": "string",
    "country": "string",
    "houseNumber": "string",
    "id": "string",
    "latitude": 0.1,
    "longitude": 0.1,
    "postalCode": "string",
    "street": "string"
  },
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedDeliveryDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "internalApprovals": [
    {
      "approved": true,
      "by": "string",
      "on": "2019-08-24T14:15:22Z",
      "reason": "string"
    }
  ],
  "internalReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "mailBody": "string",
  "note": "string",
  "pdf": {
    "blobId": "string",
    "created": "2019-08-24T14:15:22Z",
    "extension": "string",
    "fileSize": 0,
    "name": "string",
    "type": "IMAGE"
  },
  "percentageUsed": 0.1,
  "productStatus": [
    {
      "amountLeft": 0.1,
      "percentagePending": 0.1,
      "percentageReceived": 0.1,
      "percentageRejected": 0.1,
      "productId": "string",
      "quantityAccepted": 0.1,
      "quantityRejected": 0.1,
      "totalQuantity": 0.1,
      "unitPrice": 0.1
    }
  ],
  "products": [
    {
      "baseUnitConversion": 0.1,
      "baseUnitQuantity": 0.1,
      "canReceive": true,
      "currency": "string",
      "imageAssets": [
        {
          "blobId": "string",
          "created": "2019-08-24T14:15:22Z",
          "extension": "string",
          "fileSize": 0,
          "name": "string",
          "type": "IMAGE"
        }
      ],
      "price": 0.1,
      "pricePerBaseUnit": 0.1,
      "productId": "string",
      "productName": "string",
      "quantity": 0.1,
      "sourceLocationId": "string",
      "totalPrice": 0.1,
      "unit": "string",
      "unitsOfMeasurement": [
        {
          "baseUnit": true,
          "cost": 0.1,
          "decimal": true,
          "isBaseUnit": true,
          "isDecimal": true,
          "name": "string",
          "quantity": 0.1,
          "salesPrice": 0.1,
          "unit": "string"
        }
      ]
    }
  ],
  "rejectedProducts": [
    {
      "batches": [
        {
          "quantity": 0.1,
          "reason": "string"
        }
      ],
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "rejectionReason": "string",
  "sentMails": [
    "string"
  ],
  "status": "DRAFT",
  "stockSiteId": "string",
  "subsidiaryId": "string",
  "supplierEmail": "string",
  "supplierId": "string",
  "supplierReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "tenantId": "string",
  "total": 0.1,
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Receive goods

POST
/purchase-orders/{id}/receive-goods
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/purchase-orders/string/receive-goods" \  -H "Content-Type: application/json" \  -d '{    "acceptedGoods": [      {        "batchNumber": "string",        "locationId": "string",        "productId": "string",        "uomSplit": [          {            "productId": "string",            "quantity": 0.1,            "unit": "string"          }        ]      }    ],    "rejectedGoods": [      {        "productId": "string",        "unit": "string",        "uomSplit": [          {            "productId": "string",            "quantity": 0.1,            "unit": "string"          }        ]      }    ],    "shortageGoods": [      {        "productId": "string",        "unit": "string",        "uomSplit": [          {            "productId": "string",            "quantity": 0.1,            "unit": "string"          }        ]      }    ]  }'
{
  "acceptedProducts": [
    {
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "actualDeliveryDate": "2019-08-24T14:15:22Z",
  "allowOverdraft": true,
  "amountUsed": 0.1,
  "approvalRuleSnapshot": {
    "amountThreshold": 0.1,
    "approvalMode": "ANY",
    "approverUserIds": [
      "string"
    ],
    "globalApproverUserIds": [
      "string"
    ],
    "ruleId": "string"
  },
  "attachments": [
    {
      "blobId": "string",
      "created": "2019-08-24T14:15:22Z",
      "extension": "string",
      "fileSize": 0,
      "name": "string",
      "type": "IMAGE"
    }
  ],
  "baseConversionRate": 0.1,
  "cancellationReason": "string",
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "currency": "string",
  "currentLocation": {
    "address": {
      "city": "string",
      "country": "string",
      "houseNumber": "string",
      "id": "string",
      "latitude": 0.1,
      "longitude": 0.1,
      "postalCode": "string",
      "street": "string"
    },
    "coordinate": {
      "latitude": -90,
      "longitude": -180
    },
    "name": "string"
  },
  "deliveryAddress": {
    "city": "string",
    "country": "string",
    "houseNumber": "string",
    "id": "string",
    "latitude": 0.1,
    "longitude": 0.1,
    "postalCode": "string",
    "street": "string"
  },
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedDeliveryDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "internalApprovals": [
    {
      "approved": true,
      "by": "string",
      "on": "2019-08-24T14:15:22Z",
      "reason": "string"
    }
  ],
  "internalReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "mailBody": "string",
  "note": "string",
  "pdf": {
    "blobId": "string",
    "created": "2019-08-24T14:15:22Z",
    "extension": "string",
    "fileSize": 0,
    "name": "string",
    "type": "IMAGE"
  },
  "percentageUsed": 0.1,
  "productStatus": [
    {
      "amountLeft": 0.1,
      "percentagePending": 0.1,
      "percentageReceived": 0.1,
      "percentageRejected": 0.1,
      "productId": "string",
      "quantityAccepted": 0.1,
      "quantityRejected": 0.1,
      "totalQuantity": 0.1,
      "unitPrice": 0.1
    }
  ],
  "products": [
    {
      "baseUnitConversion": 0.1,
      "baseUnitQuantity": 0.1,
      "canReceive": true,
      "currency": "string",
      "imageAssets": [
        {
          "blobId": "string",
          "created": "2019-08-24T14:15:22Z",
          "extension": "string",
          "fileSize": 0,
          "name": "string",
          "type": "IMAGE"
        }
      ],
      "price": 0.1,
      "pricePerBaseUnit": 0.1,
      "productId": "string",
      "productName": "string",
      "quantity": 0.1,
      "sourceLocationId": "string",
      "totalPrice": 0.1,
      "unit": "string",
      "unitsOfMeasurement": [
        {
          "baseUnit": true,
          "cost": 0.1,
          "decimal": true,
          "isBaseUnit": true,
          "isDecimal": true,
          "name": "string",
          "quantity": 0.1,
          "salesPrice": 0.1,
          "unit": "string"
        }
      ]
    }
  ],
  "rejectedProducts": [
    {
      "batches": [
        {
          "quantity": 0.1,
          "reason": "string"
        }
      ],
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "rejectionReason": "string",
  "sentMails": [
    "string"
  ],
  "status": "DRAFT",
  "stockSiteId": "string",
  "subsidiaryId": "string",
  "supplierEmail": "string",
  "supplierId": "string",
  "supplierReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "tenantId": "string",
  "total": 0.1,
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Reinstate an order

PATCH
/purchase-orders/{id}/reinstate
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "http://localhost:18080/api/v1/purchase-orders/string/reinstate"
{
  "acceptedProducts": [
    {
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "actualDeliveryDate": "2019-08-24T14:15:22Z",
  "allowOverdraft": true,
  "amountUsed": 0.1,
  "approvalRuleSnapshot": {
    "amountThreshold": 0.1,
    "approvalMode": "ANY",
    "approverUserIds": [
      "string"
    ],
    "globalApproverUserIds": [
      "string"
    ],
    "ruleId": "string"
  },
  "attachments": [
    {
      "blobId": "string",
      "created": "2019-08-24T14:15:22Z",
      "extension": "string",
      "fileSize": 0,
      "name": "string",
      "type": "IMAGE"
    }
  ],
  "baseConversionRate": 0.1,
  "cancellationReason": "string",
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "currency": "string",
  "currentLocation": {
    "address": {
      "city": "string",
      "country": "string",
      "houseNumber": "string",
      "id": "string",
      "latitude": 0.1,
      "longitude": 0.1,
      "postalCode": "string",
      "street": "string"
    },
    "coordinate": {
      "latitude": -90,
      "longitude": -180
    },
    "name": "string"
  },
  "deliveryAddress": {
    "city": "string",
    "country": "string",
    "houseNumber": "string",
    "id": "string",
    "latitude": 0.1,
    "longitude": 0.1,
    "postalCode": "string",
    "street": "string"
  },
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedDeliveryDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "internalApprovals": [
    {
      "approved": true,
      "by": "string",
      "on": "2019-08-24T14:15:22Z",
      "reason": "string"
    }
  ],
  "internalReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "mailBody": "string",
  "note": "string",
  "pdf": {
    "blobId": "string",
    "created": "2019-08-24T14:15:22Z",
    "extension": "string",
    "fileSize": 0,
    "name": "string",
    "type": "IMAGE"
  },
  "percentageUsed": 0.1,
  "productStatus": [
    {
      "amountLeft": 0.1,
      "percentagePending": 0.1,
      "percentageReceived": 0.1,
      "percentageRejected": 0.1,
      "productId": "string",
      "quantityAccepted": 0.1,
      "quantityRejected": 0.1,
      "totalQuantity": 0.1,
      "unitPrice": 0.1
    }
  ],
  "products": [
    {
      "baseUnitConversion": 0.1,
      "baseUnitQuantity": 0.1,
      "canReceive": true,
      "currency": "string",
      "imageAssets": [
        {
          "blobId": "string",
          "created": "2019-08-24T14:15:22Z",
          "extension": "string",
          "fileSize": 0,
          "name": "string",
          "type": "IMAGE"
        }
      ],
      "price": 0.1,
      "pricePerBaseUnit": 0.1,
      "productId": "string",
      "productName": "string",
      "quantity": 0.1,
      "sourceLocationId": "string",
      "totalPrice": 0.1,
      "unit": "string",
      "unitsOfMeasurement": [
        {
          "baseUnit": true,
          "cost": 0.1,
          "decimal": true,
          "isBaseUnit": true,
          "isDecimal": true,
          "name": "string",
          "quantity": 0.1,
          "salesPrice": 0.1,
          "unit": "string"
        }
      ]
    }
  ],
  "rejectedProducts": [
    {
      "batches": [
        {
          "quantity": 0.1,
          "reason": "string"
        }
      ],
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "rejectionReason": "string",
  "sentMails": [
    "string"
  ],
  "status": "DRAFT",
  "stockSiteId": "string",
  "subsidiaryId": "string",
  "supplierEmail": "string",
  "supplierId": "string",
  "supplierReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "tenantId": "string",
  "total": 0.1,
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Reject an order internally

PATCH
/purchase-orders/{id}/reject-internal
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body?string

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "http://localhost:18080/api/v1/purchase-orders/string/reject-internal" \  -H "Content-Type: application/json" \  -d 'string'
{
  "acceptedProducts": [
    {
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "actualDeliveryDate": "2019-08-24T14:15:22Z",
  "allowOverdraft": true,
  "amountUsed": 0.1,
  "approvalRuleSnapshot": {
    "amountThreshold": 0.1,
    "approvalMode": "ANY",
    "approverUserIds": [
      "string"
    ],
    "globalApproverUserIds": [
      "string"
    ],
    "ruleId": "string"
  },
  "attachments": [
    {
      "blobId": "string",
      "created": "2019-08-24T14:15:22Z",
      "extension": "string",
      "fileSize": 0,
      "name": "string",
      "type": "IMAGE"
    }
  ],
  "baseConversionRate": 0.1,
  "cancellationReason": "string",
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "currency": "string",
  "currentLocation": {
    "address": {
      "city": "string",
      "country": "string",
      "houseNumber": "string",
      "id": "string",
      "latitude": 0.1,
      "longitude": 0.1,
      "postalCode": "string",
      "street": "string"
    },
    "coordinate": {
      "latitude": -90,
      "longitude": -180
    },
    "name": "string"
  },
  "deliveryAddress": {
    "city": "string",
    "country": "string",
    "houseNumber": "string",
    "id": "string",
    "latitude": 0.1,
    "longitude": 0.1,
    "postalCode": "string",
    "street": "string"
  },
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedDeliveryDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "internalApprovals": [
    {
      "approved": true,
      "by": "string",
      "on": "2019-08-24T14:15:22Z",
      "reason": "string"
    }
  ],
  "internalReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "mailBody": "string",
  "note": "string",
  "pdf": {
    "blobId": "string",
    "created": "2019-08-24T14:15:22Z",
    "extension": "string",
    "fileSize": 0,
    "name": "string",
    "type": "IMAGE"
  },
  "percentageUsed": 0.1,
  "productStatus": [
    {
      "amountLeft": 0.1,
      "percentagePending": 0.1,
      "percentageReceived": 0.1,
      "percentageRejected": 0.1,
      "productId": "string",
      "quantityAccepted": 0.1,
      "quantityRejected": 0.1,
      "totalQuantity": 0.1,
      "unitPrice": 0.1
    }
  ],
  "products": [
    {
      "baseUnitConversion": 0.1,
      "baseUnitQuantity": 0.1,
      "canReceive": true,
      "currency": "string",
      "imageAssets": [
        {
          "blobId": "string",
          "created": "2019-08-24T14:15:22Z",
          "extension": "string",
          "fileSize": 0,
          "name": "string",
          "type": "IMAGE"
        }
      ],
      "price": 0.1,
      "pricePerBaseUnit": 0.1,
      "productId": "string",
      "productName": "string",
      "quantity": 0.1,
      "sourceLocationId": "string",
      "totalPrice": 0.1,
      "unit": "string",
      "unitsOfMeasurement": [
        {
          "baseUnit": true,
          "cost": 0.1,
          "decimal": true,
          "isBaseUnit": true,
          "isDecimal": true,
          "name": "string",
          "quantity": 0.1,
          "salesPrice": 0.1,
          "unit": "string"
        }
      ]
    }
  ],
  "rejectedProducts": [
    {
      "batches": [
        {
          "quantity": 0.1,
          "reason": "string"
        }
      ],
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "rejectionReason": "string",
  "sentMails": [
    "string"
  ],
  "status": "DRAFT",
  "stockSiteId": "string",
  "subsidiaryId": "string",
  "supplierEmail": "string",
  "supplierId": "string",
  "supplierReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "tenantId": "string",
  "total": 0.1,
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Reject an order by supplier

PATCH
/purchase-orders/{id}/reject-supplier
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body?string

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "http://localhost:18080/api/v1/purchase-orders/string/reject-supplier" \  -H "Content-Type: application/json" \  -d 'string'
{
  "acceptedProducts": [
    {
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "actualDeliveryDate": "2019-08-24T14:15:22Z",
  "allowOverdraft": true,
  "amountUsed": 0.1,
  "approvalRuleSnapshot": {
    "amountThreshold": 0.1,
    "approvalMode": "ANY",
    "approverUserIds": [
      "string"
    ],
    "globalApproverUserIds": [
      "string"
    ],
    "ruleId": "string"
  },
  "attachments": [
    {
      "blobId": "string",
      "created": "2019-08-24T14:15:22Z",
      "extension": "string",
      "fileSize": 0,
      "name": "string",
      "type": "IMAGE"
    }
  ],
  "baseConversionRate": 0.1,
  "cancellationReason": "string",
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "currency": "string",
  "currentLocation": {
    "address": {
      "city": "string",
      "country": "string",
      "houseNumber": "string",
      "id": "string",
      "latitude": 0.1,
      "longitude": 0.1,
      "postalCode": "string",
      "street": "string"
    },
    "coordinate": {
      "latitude": -90,
      "longitude": -180
    },
    "name": "string"
  },
  "deliveryAddress": {
    "city": "string",
    "country": "string",
    "houseNumber": "string",
    "id": "string",
    "latitude": 0.1,
    "longitude": 0.1,
    "postalCode": "string",
    "street": "string"
  },
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedDeliveryDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "internalApprovals": [
    {
      "approved": true,
      "by": "string",
      "on": "2019-08-24T14:15:22Z",
      "reason": "string"
    }
  ],
  "internalReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "mailBody": "string",
  "note": "string",
  "pdf": {
    "blobId": "string",
    "created": "2019-08-24T14:15:22Z",
    "extension": "string",
    "fileSize": 0,
    "name": "string",
    "type": "IMAGE"
  },
  "percentageUsed": 0.1,
  "productStatus": [
    {
      "amountLeft": 0.1,
      "percentagePending": 0.1,
      "percentageReceived": 0.1,
      "percentageRejected": 0.1,
      "productId": "string",
      "quantityAccepted": 0.1,
      "quantityRejected": 0.1,
      "totalQuantity": 0.1,
      "unitPrice": 0.1
    }
  ],
  "products": [
    {
      "baseUnitConversion": 0.1,
      "baseUnitQuantity": 0.1,
      "canReceive": true,
      "currency": "string",
      "imageAssets": [
        {
          "blobId": "string",
          "created": "2019-08-24T14:15:22Z",
          "extension": "string",
          "fileSize": 0,
          "name": "string",
          "type": "IMAGE"
        }
      ],
      "price": 0.1,
      "pricePerBaseUnit": 0.1,
      "productId": "string",
      "productName": "string",
      "quantity": 0.1,
      "sourceLocationId": "string",
      "totalPrice": 0.1,
      "unit": "string",
      "unitsOfMeasurement": [
        {
          "baseUnit": true,
          "cost": 0.1,
          "decimal": true,
          "isBaseUnit": true,
          "isDecimal": true,
          "name": "string",
          "quantity": 0.1,
          "salesPrice": 0.1,
          "unit": "string"
        }
      ]
    }
  ],
  "rejectedProducts": [
    {
      "batches": [
        {
          "quantity": 0.1,
          "reason": "string"
        }
      ],
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "rejectionReason": "string",
  "sentMails": [
    "string"
  ],
  "status": "DRAFT",
  "stockSiteId": "string",
  "subsidiaryId": "string",
  "supplierEmail": "string",
  "supplierId": "string",
  "supplierReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "tenantId": "string",
  "total": 0.1,
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Request internal approval for order

PATCH
/purchase-orders/{id}/request-internal-approval
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "http://localhost:18080/api/v1/purchase-orders/string/request-internal-approval"
{
  "acceptedProducts": [
    {
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "actualDeliveryDate": "2019-08-24T14:15:22Z",
  "allowOverdraft": true,
  "amountUsed": 0.1,
  "approvalRuleSnapshot": {
    "amountThreshold": 0.1,
    "approvalMode": "ANY",
    "approverUserIds": [
      "string"
    ],
    "globalApproverUserIds": [
      "string"
    ],
    "ruleId": "string"
  },
  "attachments": [
    {
      "blobId": "string",
      "created": "2019-08-24T14:15:22Z",
      "extension": "string",
      "fileSize": 0,
      "name": "string",
      "type": "IMAGE"
    }
  ],
  "baseConversionRate": 0.1,
  "cancellationReason": "string",
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "currency": "string",
  "currentLocation": {
    "address": {
      "city": "string",
      "country": "string",
      "houseNumber": "string",
      "id": "string",
      "latitude": 0.1,
      "longitude": 0.1,
      "postalCode": "string",
      "street": "string"
    },
    "coordinate": {
      "latitude": -90,
      "longitude": -180
    },
    "name": "string"
  },
  "deliveryAddress": {
    "city": "string",
    "country": "string",
    "houseNumber": "string",
    "id": "string",
    "latitude": 0.1,
    "longitude": 0.1,
    "postalCode": "string",
    "street": "string"
  },
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedDeliveryDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "internalApprovals": [
    {
      "approved": true,
      "by": "string",
      "on": "2019-08-24T14:15:22Z",
      "reason": "string"
    }
  ],
  "internalReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "mailBody": "string",
  "note": "string",
  "pdf": {
    "blobId": "string",
    "created": "2019-08-24T14:15:22Z",
    "extension": "string",
    "fileSize": 0,
    "name": "string",
    "type": "IMAGE"
  },
  "percentageUsed": 0.1,
  "productStatus": [
    {
      "amountLeft": 0.1,
      "percentagePending": 0.1,
      "percentageReceived": 0.1,
      "percentageRejected": 0.1,
      "productId": "string",
      "quantityAccepted": 0.1,
      "quantityRejected": 0.1,
      "totalQuantity": 0.1,
      "unitPrice": 0.1
    }
  ],
  "products": [
    {
      "baseUnitConversion": 0.1,
      "baseUnitQuantity": 0.1,
      "canReceive": true,
      "currency": "string",
      "imageAssets": [
        {
          "blobId": "string",
          "created": "2019-08-24T14:15:22Z",
          "extension": "string",
          "fileSize": 0,
          "name": "string",
          "type": "IMAGE"
        }
      ],
      "price": 0.1,
      "pricePerBaseUnit": 0.1,
      "productId": "string",
      "productName": "string",
      "quantity": 0.1,
      "sourceLocationId": "string",
      "totalPrice": 0.1,
      "unit": "string",
      "unitsOfMeasurement": [
        {
          "baseUnit": true,
          "cost": 0.1,
          "decimal": true,
          "isBaseUnit": true,
          "isDecimal": true,
          "name": "string",
          "quantity": 0.1,
          "salesPrice": 0.1,
          "unit": "string"
        }
      ]
    }
  ],
  "rejectedProducts": [
    {
      "batches": [
        {
          "quantity": 0.1,
          "reason": "string"
        }
      ],
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "rejectionReason": "string",
  "sentMails": [
    "string"
  ],
  "status": "DRAFT",
  "stockSiteId": "string",
  "subsidiaryId": "string",
  "supplierEmail": "string",
  "supplierId": "string",
  "supplierReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "tenantId": "string",
  "total": 0.1,
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Resolve shortage via expense write-off

POST
/purchase-orders/{id}/resolve-shortage/expense
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/purchase-orders/string/resolve-shortage/expense" \  -H "Content-Type: application/json" \  -d '{    "glAccountId": "string",    "items": [      {        "productId": "string",        "quantity": 0.1      }    ]  }'
Empty
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Send purchase order email

POST
/purchase-orders/{id}/send-mail
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/purchase-orders/string/send-mail" \  -F pdf="string"
{
  "acceptedProducts": [
    {
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "actualDeliveryDate": "2019-08-24T14:15:22Z",
  "allowOverdraft": true,
  "amountUsed": 0.1,
  "approvalRuleSnapshot": {
    "amountThreshold": 0.1,
    "approvalMode": "ANY",
    "approverUserIds": [
      "string"
    ],
    "globalApproverUserIds": [
      "string"
    ],
    "ruleId": "string"
  },
  "attachments": [
    {
      "blobId": "string",
      "created": "2019-08-24T14:15:22Z",
      "extension": "string",
      "fileSize": 0,
      "name": "string",
      "type": "IMAGE"
    }
  ],
  "baseConversionRate": 0.1,
  "cancellationReason": "string",
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "currency": "string",
  "currentLocation": {
    "address": {
      "city": "string",
      "country": "string",
      "houseNumber": "string",
      "id": "string",
      "latitude": 0.1,
      "longitude": 0.1,
      "postalCode": "string",
      "street": "string"
    },
    "coordinate": {
      "latitude": -90,
      "longitude": -180
    },
    "name": "string"
  },
  "deliveryAddress": {
    "city": "string",
    "country": "string",
    "houseNumber": "string",
    "id": "string",
    "latitude": 0.1,
    "longitude": 0.1,
    "postalCode": "string",
    "street": "string"
  },
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedDeliveryDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "internalApprovals": [
    {
      "approved": true,
      "by": "string",
      "on": "2019-08-24T14:15:22Z",
      "reason": "string"
    }
  ],
  "internalReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "mailBody": "string",
  "note": "string",
  "pdf": {
    "blobId": "string",
    "created": "2019-08-24T14:15:22Z",
    "extension": "string",
    "fileSize": 0,
    "name": "string",
    "type": "IMAGE"
  },
  "percentageUsed": 0.1,
  "productStatus": [
    {
      "amountLeft": 0.1,
      "percentagePending": 0.1,
      "percentageReceived": 0.1,
      "percentageRejected": 0.1,
      "productId": "string",
      "quantityAccepted": 0.1,
      "quantityRejected": 0.1,
      "totalQuantity": 0.1,
      "unitPrice": 0.1
    }
  ],
  "products": [
    {
      "baseUnitConversion": 0.1,
      "baseUnitQuantity": 0.1,
      "canReceive": true,
      "currency": "string",
      "imageAssets": [
        {
          "blobId": "string",
          "created": "2019-08-24T14:15:22Z",
          "extension": "string",
          "fileSize": 0,
          "name": "string",
          "type": "IMAGE"
        }
      ],
      "price": 0.1,
      "pricePerBaseUnit": 0.1,
      "productId": "string",
      "productName": "string",
      "quantity": 0.1,
      "sourceLocationId": "string",
      "totalPrice": 0.1,
      "unit": "string",
      "unitsOfMeasurement": [
        {
          "baseUnit": true,
          "cost": 0.1,
          "decimal": true,
          "isBaseUnit": true,
          "isDecimal": true,
          "name": "string",
          "quantity": 0.1,
          "salesPrice": 0.1,
          "unit": "string"
        }
      ]
    }
  ],
  "rejectedProducts": [
    {
      "batches": [
        {
          "quantity": 0.1,
          "reason": "string"
        }
      ],
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "rejectionReason": "string",
  "sentMails": [
    "string"
  ],
  "status": "DRAFT",
  "stockSiteId": "string",
  "subsidiaryId": "string",
  "supplierEmail": "string",
  "supplierId": "string",
  "supplierReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "tenantId": "string",
  "total": 0.1,
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get shortage summary for a purchase order

GET
/purchase-orders/{id}/shortage-summary
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/purchase-orders/string/shortage-summary"
{
  "items": [
    {
      "productId": "string",
      "productName": "string",
      "resolvedQuantity": 0.1,
      "shortageQuantity": 0.1,
      "unitPrice": 0.1,
      "unresolvedQuantity": 0.1,
      "unresolvedValue": 0.1
    }
  ]
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Upload attachments to a purchase order

POST
/purchase-orders/{id}/upload-attachments
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/purchase-orders/string/upload-attachments" \  -F files="[\n  \"string\"\n]"
{
  "acceptedProducts": [
    {
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "actualDeliveryDate": "2019-08-24T14:15:22Z",
  "allowOverdraft": true,
  "amountUsed": 0.1,
  "approvalRuleSnapshot": {
    "amountThreshold": 0.1,
    "approvalMode": "ANY",
    "approverUserIds": [
      "string"
    ],
    "globalApproverUserIds": [
      "string"
    ],
    "ruleId": "string"
  },
  "attachments": [
    {
      "blobId": "string",
      "created": "2019-08-24T14:15:22Z",
      "extension": "string",
      "fileSize": 0,
      "name": "string",
      "type": "IMAGE"
    }
  ],
  "baseConversionRate": 0.1,
  "cancellationReason": "string",
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "currency": "string",
  "currentLocation": {
    "address": {
      "city": "string",
      "country": "string",
      "houseNumber": "string",
      "id": "string",
      "latitude": 0.1,
      "longitude": 0.1,
      "postalCode": "string",
      "street": "string"
    },
    "coordinate": {
      "latitude": -90,
      "longitude": -180
    },
    "name": "string"
  },
  "deliveryAddress": {
    "city": "string",
    "country": "string",
    "houseNumber": "string",
    "id": "string",
    "latitude": 0.1,
    "longitude": 0.1,
    "postalCode": "string",
    "street": "string"
  },
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "expectedDeliveryDate": "2019-08-24T14:15:22Z",
  "id": "string",
  "internalApprovals": [
    {
      "approved": true,
      "by": "string",
      "on": "2019-08-24T14:15:22Z",
      "reason": "string"
    }
  ],
  "internalReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "mailBody": "string",
  "note": "string",
  "pdf": {
    "blobId": "string",
    "created": "2019-08-24T14:15:22Z",
    "extension": "string",
    "fileSize": 0,
    "name": "string",
    "type": "IMAGE"
  },
  "percentageUsed": 0.1,
  "productStatus": [
    {
      "amountLeft": 0.1,
      "percentagePending": 0.1,
      "percentageReceived": 0.1,
      "percentageRejected": 0.1,
      "productId": "string",
      "quantityAccepted": 0.1,
      "quantityRejected": 0.1,
      "totalQuantity": 0.1,
      "unitPrice": 0.1
    }
  ],
  "products": [
    {
      "baseUnitConversion": 0.1,
      "baseUnitQuantity": 0.1,
      "canReceive": true,
      "currency": "string",
      "imageAssets": [
        {
          "blobId": "string",
          "created": "2019-08-24T14:15:22Z",
          "extension": "string",
          "fileSize": 0,
          "name": "string",
          "type": "IMAGE"
        }
      ],
      "price": 0.1,
      "pricePerBaseUnit": 0.1,
      "productId": "string",
      "productName": "string",
      "quantity": 0.1,
      "sourceLocationId": "string",
      "totalPrice": 0.1,
      "unit": "string",
      "unitsOfMeasurement": [
        {
          "baseUnit": true,
          "cost": 0.1,
          "decimal": true,
          "isBaseUnit": true,
          "isDecimal": true,
          "name": "string",
          "quantity": 0.1,
          "salesPrice": 0.1,
          "unit": "string"
        }
      ]
    }
  ],
  "rejectedProducts": [
    {
      "batches": [
        {
          "quantity": 0.1,
          "reason": "string"
        }
      ],
      "productId": "string",
      "quantity": 0.1
    }
  ],
  "rejectionReason": "string",
  "sentMails": [
    "string"
  ],
  "status": "DRAFT",
  "stockSiteId": "string",
  "subsidiaryId": "string",
  "supplierEmail": "string",
  "supplierId": "string",
  "supplierReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "tenantId": "string",
  "total": 0.1,
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}