API ReferenceOrder
Create purchase orders from sales order
Creates purchase orders for shortage items grouped by supplier
AuthorizationBearer <token>
In: header
Path Parameters
id*string
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
stockSiteId*string
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "http://localhost:18080/api/v1/orders/string/create-purchase-orders" \ -H "Content-Type: application/json" \ -d '{ "stockSiteId": "string" }'{
"createdPurchaseOrders": [
{
"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",
"number": "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",
"requestedAt": "2019-08-24T14:15:22Z",
"requestedBy": "string",
"requesterSignature": {
"blobId": "string",
"created": "2019-08-24T14:15:22Z",
"extension": "string",
"fileSize": 0,
"name": "string",
"type": "IMAGE"
},
"salesOrderId": "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"
}
],
"skippedProducts": [
{
"productId": "string",
"productName": "string",
"reason": "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"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}