{"swagger":"2.0","info":{"description":"\"REST API for AB-Inbev Order Relay Service Microservice\"","title":"AB-Inbev B2B Order Relay Service (Delta)","license":{"name":"Anheuser-Busch InBev © 2019"}},"host":"services-uat.bees-platform.dev/v1","basePath":"/order-relay/","tags":[{"name":"Order Relay API","description":"ABI B2B Global Order Relay Service."}],"paths":{"/":{"post":{"tags":["Order Relay API"],"summary":"Create/Update Order","operationId":"postUsingPOST","consumes":["application/json"],"produces":["*/*"],"parameters":[{"in":"body","name":"request","description":"request","required":false,"schema":{"type":"array","items":{"$ref":"#/definitions/Order"}}},{"name":"x-timestamp","in":"header","description":"Timestamp in milliseconds","required":false,"type":"string"},{"name":"Authorization","in":"header","description":"The HTTP Authorization request header","required":true,"type":"string"},{"name":"country","in":"header","description":"country","required":true,"type":"string"},{"name":"requestTraceId","in":"header","description":"Cross transaction unique ID. Used to track the request across systems.","required":true,"type":"string"}],"responses":{"202":{"description":"Accept"},"400":{"description":"Bad Request"},"403":{"description":"Forbidden"}}}}},"definitions":{"Combo":{"type":"object","required":["id","items","price","quantity"],"properties":{"description":{"type":"string","description":"The combo description.","allowEmptyValue":false},"id":{"type":"string","description":"The combo id.","allowEmptyValue":false},"image":{"type":"string","description":"The combo image.","allowEmptyValue":false},"items":{"type":"array","description":"List of items in the combo.","allowEmptyValue":false,"items":{"$ref":"#/definitions/Item"}},"originalPrice":{"type":"number","description":"The combo price without discount.","allowEmptyValue":false},"price":{"type":"number","description":"The combo price with discount.","allowEmptyValue":false},"quantity":{"type":"integer","format":"int32","description":"The combo quantity selected by customer.","allowEmptyValue":false},"title":{"type":"string","description":"The combo title.","allowEmptyValue":false},"type":{"type":"string","example":"P (percentage), FG (freegood)","description":"The combo type.","allowEmptyValue":false}},"title":"Combo"},"Conditions":{"type":"object","properties":{"type":{"type":"string","example":"MAXIMUM_ORDER_TOTAL","description":"Condition type","allowEmptyValue":false},"value":{"type":"number","example":10.5,"description":"Condition value","allowEmptyValue":false}},"title":"Conditions"},"Container":{"type":"object","properties":{"itemSize":{"type":"number","example":350,"description":"The size of this container.","allowEmptyValue":false},"name":{"type":"string","example":"LATA","description":"The container name.","allowEmptyValue":false},"returnable":{"type":"boolean","example":false,"description":"If this container is returnable.","allowEmptyValue":false},"unitOfMeasurement":{"type":"string","example":"ML","description":"The unit of measurement used in this container.","allowEmptyValue":false}},"title":"Container"},"Delivery":{"type":"object","properties":{"date":{"type":"string","example":"2019-10-05","description":"Delivery date selected by customer. If the selected delivery window is a date range, this field doesn't apply. (ISO 8601 format)","allowEmptyValue":false},"note":{"type":"string","description":"Free text field where user can input notes about order delivery.","allowEmptyValue":false},"windowId":{"type":"string","description":"The delivery window selected by customer for this order.","allowEmptyValue":false}},"title":"Delivery"},"Detail":{"type":"object","properties":{"conditions":{"type":"array","description":"Conditions list","allowEmptyValue":false,"items":{"$ref":"#/definitions/Conditions"}},"externalId":{"type":"string","example":"NON_REGULAR_DELIVERY_DATE_FEE","description":"External id","allowEmptyValue":false},"interestId":{"type":"string","example":"NON_REGULAR_DELIVERY_DATE_FEE","description":"Interest id","allowEmptyValue":false},"value":{"type":"number","example":12.07,"description":"Detail value","allowEmptyValue":false}},"title":"Detail"},"Empties":{"type":"object","properties":{"extraAmount":{"type":"integer","format":"int32","description":"Extra amount that the customer may want to return beyond the required quantity.","allowEmptyValue":false},"minimumRequired":{"type":"integer","format":"int32","description":"Minimum amount of empties required to be returned.","allowEmptyValue":false},"totalAmount":{"type":"integer","format":"int32","description":"Summary of total empties to be returned on this order.","allowEmptyValue":false}},"title":"Empties"},"Interest":{"type":"object","properties":{"detail":{"type":"array","description":"Interest details list","allowEmptyValue":false,"items":{"$ref":"#/definitions/Detail"}},"loanDeduction":{"type":"number","example":5.2,"description":"Interest Loan Deduction","allowEmptyValue":false},"total":{"type":"number","example":10.2,"description":"Interest total","allowEmptyValue":false}},"title":"Interest"},"Item":{"type":"object","required":["quantity","sku"],"properties":{"container":{"description":"The item's container. Better understood as the object that holds the liquid.","allowEmptyValue":false,"$ref":"#/definitions/Container"},"discount":{"type":"number","description":"The item discount.","allowEmptyValue":false},"freeGood":{"type":"boolean","example":false,"description":"Identify whether a product is a free good.","allowEmptyValue":false},"image":{"type":"string","description":"The item image.","allowEmptyValue":false},"isEmpty":{"type":"boolean","example":false,"description":"Flag to distinguish items from empties","allowEmptyValue":false},"measureUnit":{"type":"string","example":"UN","description":"Item measure unit","allowEmptyValue":false},"name":{"type":"string","description":"The item name.","allowEmptyValue":false},"originalPrice":{"type":"number","example":10.15,"description":"The item original price.","allowEmptyValue":false},"package":{"description":"The item(container's) package. Better understood as the items shipping package","allowEmptyValue":false,"$ref":"#/definitions/Package"},"price":{"type":"number","description":"The item discount.","allowEmptyValue":false},"priceLists":{"type":"array","description":"The price lists applied for the item.","allowEmptyValue":false,"items":{"type":"string"}},"pricingReasonDetail":{"type":"array","description":"The pricing explanation details","allowEmptyValue":false,"items":{"$ref":"#/definitions/PricingReasonDetail"}},"quantity":{"type":"integer","format":"int32","description":"The item quantity selected by customer. Can be adjusted by order simulation and not reflect exactly what customer selected.","allowEmptyValue":false},"sku":{"type":"string","description":"The item sku.","allowEmptyValue":false},"subtotal":{"type":"number","description":"The item subtotal.","allowEmptyValue":false},"tax":{"type":"number","description":"The item tax.","allowEmptyValue":false},"total":{"type":"number","description":"The item total.","allowEmptyValue":false},"totalExclCharges":{"type":"number","description":"Price without charges","allowEmptyValue":false}},"title":"Item"},"Message":{"type":"object","required":["text","type"],"properties":{"text":{"type":"string","description":"The message text.","allowEmptyValue":false},"type":{"type":"string","description":"The message type.","allowEmptyValue":false,"enum":["ERROR","WARNING","INFO","SUCCESS"]}},"title":"Message"},"Order":{"type":"object","required":["accountId","channel","paymentMethod","placementDate","status"],"properties":{"accountId":{"type":"string","description":"The account ID.","allowEmptyValue":false},"cancellableUntil":{"type":"string","example":"2011-12-03T10:15:30+01:00","description":"If this field is filled this order is able to be cancelled until the date. If not filled, the order is not cancellable.","allowEmptyValue":false},"cancellationReason":{"type":"string","description":"Cancellation reason filled by the customer.","allowEmptyValue":false},"channel":{"type":"string","example":"B2B_WEB","description":"The source channel which created this order.","allowEmptyValue":false,"enum":["B2B_WEB","B2B_APP","TELESALES","OTHER"]},"chargeAmount":{"type":"number","example":10.15,"description":"Charge cost","allowEmptyValue":false},"combos":{"type":"array","description":"List of combo from order.","allowEmptyValue":false,"items":{"$ref":"#/definitions/Combo"}},"delivery":{"description":"Data about order delivery","allowEmptyValue":false,"$ref":"#/definitions/Delivery"},"deliveryCenter":{"type":"string","description":"Data about delivery delivery","allowEmptyValue":false},"deposit":{"type":"number","example":10.1,"description":"The deposit amount from this order","allowEmptyValue":false},"discount":{"type":"number","description":"The order discount.","allowEmptyValue":false},"empties":{"description":"Data about empties in the order.","allowEmptyValue":false,"$ref":"#/definitions/Empties"},"erpOrderNumber":{"type":"string","description":"Order number generated by ERP.","allowEmptyValue":false},"extraEmptiesDiscountAmount":{"type":"number","example":10.15,"description":"Empties discount","allowEmptyValue":false},"hasOverprice":{"type":"boolean","example":false,"description":"Indicating which accounts are overpriced and which are not","allowEmptyValue":false},"interest":{"description":"Interest Information","allowEmptyValue":false,"$ref":"#/definitions/Interest"},"interestAmount":{"type":"number","description":"The interest amount.","allowEmptyValue":false},"items":{"type":"array","description":"The list of items.","allowEmptyValue":false,"items":{"$ref":"#/definitions/Item"}},"itemsQuantity":{"type":"integer","format":"int32","description":"The quantity of items.","allowEmptyValue":false},"loanDeduction":{"type":"number","example":10.15,"description":"Loan Deduction","allowEmptyValue":false},"messages":{"type":"array","description":"List of messages.","allowEmptyValue":false,"items":{"$ref":"#/definitions/Message"}},"note":{"type":"string","description":"Free text field where user can input notes about order.","allowEmptyValue":false},"orderNumber":{"type":"string","description":"Backend order number. A unique order identifier provided by backend.","allowEmptyValue":false},"paymentMethod":{"type":"string","description":"Allowed payment methods for this account. The permitted values are: CREDIT, CASH and BANK_SLIP","allowEmptyValue":false,"enum":["CREDIT","CASH","BANK_SLIP"]},"paymentTerm":{"type":"integer","format":"int32","example":1,"description":"The payment term (in days) that will be used.","allowEmptyValue":false},"placementDate":{"type":"string","example":"2019-10-05T11:10:05.123Z","description":"Order placement date.","allowEmptyValue":false},"poNumber":{"type":"string","description":"Purchase Order number.","allowEmptyValue":false},"pricingReasonDetail":{"type":"array","description":"The pricing explanation details","allowEmptyValue":false,"items":{"$ref":"#/definitions/PricingReasonDetail"}},"status":{"type":"string","example":"PLACED","description":"Order status. Orders can be created with any status but if a order exists and isn't in PENDING status the order can't be updated as PENDING","allowEmptyValue":false,"enum":["PENDING","PLACED","CONFIRMED","DENIED","MODIFIED","IN_TRANSIT","CANCELLED","DELIVERED","PARTIAL_DELIVERY","INVOICED","PENDING_CANCELLATION"]},"subtotal":{"type":"number","description":"The order subtotal.","allowEmptyValue":false},"tax":{"type":"number","description":"The order tax.","allowEmptyValue":false},"total":{"type":"number","description":"The order total.","allowEmptyValue":false}},"title":"Order"},"Package":{"type":"object","properties":{"itemCount":{"type":"integer","format":"int64","description":"The quantity of items inside the package.","allowEmptyValue":false},"materialType":{"type":"string","description":"The type of material in the package.","allowEmptyValue":false},"name":{"type":"string","description":"The package name.","allowEmptyValue":false},"pack":{"type":"string","description":"Package type.","allowEmptyValue":false},"packageId":{"type":"string","description":"The package unique identifier.","allowEmptyValue":false},"unitCount":{"type":"integer","format":"int32","description":"The amount of units inside the package.","allowEmptyValue":false}},"title":"Package"},"PricingReasonDetail":{"type":"object","properties":{"discountAmount":{"type":"number","example":10.15,"description":"Deal Budget","allowEmptyValue":false},"id":{"type":"string","example":"DEAL-001","description":"The deal ID","allowEmptyValue":false},"type":{"type":"string","example":"RECOMMENDATION","description":"The type for this deal","allowEmptyValue":false},"externalId":{"type":"string","example":"EXTERNAL-002","description":"The externalId for this deal","allowEmptyValue":false}},"title":"PricingReasonDetail"}}}