{"openapi":"3.0.0","paths":{"/api/v1/business-units/{businessUnitId}/customer-order:sync":{"put":{"description":"This endpoint allow external users to update customer order info","operationId":"syncCustomerOrder","parameters":[{"name":"Correlation-Id","required":false,"in":"header","description":"Id used for tracking a request throughout the system(s). Autogenerated if not supplied.","schema":{"type":"string"}},{"name":"businessUnitId","required":true,"in":"path","description":"Business Unit id","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOrderDto"}}}},"responses":{"202":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncCustomerOrderResponseDto"}}}},"403":{"description":"Unauthorized"}},"summary":"Sync customer order data","tags":["CustomerOrderExternal"],"x-permissions":["coe.customer-order.sync"],"x-permissions-audience-override":["customer-order-external-api"]}}},"info":{"title":"Customer Order External API","description":"Customer Order External API docs <br><br> <a href=\"https://customer-order-external-api.retailsvc.com/schemas/v1/openapi.json\">OpenAPI Document (json)</a>","version":"1.0","contact":{},"license":{"name":"UNLICENSED","url":"UNLICENSED"}},"tags":[],"servers":[{"url":"https://customer-order-external-api.retailsvc.com"}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"JWT Authorization header using the Bearer scheme."}},"schemas":{"ExternalIdDto":{"type":"object","properties":{"providerName":{"type":"string","description":"Provider setting the id"},"id":{"type":"string","description":"External Id"}},"required":["providerName","id"]},"OrderStatusDto":{"type":"object","properties":{"status":{"type":"string","enum":["CREATED","PAYMENT_PENDING","IN_PROGRESS","CANCELLED","FULFILLED"],"description":"Order status."},"changedDateTime":{"type":"string","description":"Date and time when status changed.","format":"date-time"}},"required":["status"]},"LoyaltyDto":{"type":"object","properties":{"loyaltyCustomerId":{"type":"string","description":"Identifier for the loyalty customer."},"loyaltyProgramId":{"type":"string","description":"Identifier for the loyalty program."},"loyaltyCardNumber":{"type":"string","description":"The loyalty card number."},"bonusEligible":{"type":"boolean","description":"Indicates if the customer is eligible for bonuses."}},"required":["loyaltyCustomerId"]},"QuantityDto":{"type":"object","properties":{"value":{"type":"number","description":"The quantity of the item","format":"float"},"unitOfMeasure":{"type":"string","enum":["EA","CMK","CMQ","YDQ","FTQ","INQ","CMT","MTQ","FOT","GRM","INH","KGM","LBR","LTR","MMT","MTR","MMK","OZI","OZA","FTK","INK","MTK","YDK","YRD"],"description":"Unit of measure for the item (e.g., EA)."}},"required":["value"]},"UnitDiscountDto":{"type":"object","properties":{"rewardType":{"type":"string","enum":["GLOBAL_ABSOLUTE","NET_PRICE","PRICE_REDUCTION","COMBO_REDUCTION","COMBO","GLOBAL_PERCENTAGE","PERCENTAGE","COMBO_PERCENTAGE"],"description":"Type of reward (e.g., PERCENTAGE, AMOUNT)."},"discountId":{"type":"string","description":"Identifier for the discount."},"discountAmount":{"type":"number","description":"The monetary amount per unit of the discount.","format":"float"},"discountText":{"type":"string","description":"Description of the discount."},"discountPercentage":{"type":"number","description":"The percentage of the discount. Set if rewardType is percentage. This value is only for presentation, the actual amount needs to be specified in discountAmount.","format":"float"}},"required":["rewardType","discountId","discountAmount","discountText"]},"AdditionalPropertiesDto":{"type":"object","properties":{"key":{"type":"string","description":"The key for the extension data."},"value":{"type":"string","description":"The value associated with the key."}},"required":["key","value"]},"LineItemDto":{"type":"object","properties":{"lineItemId":{"type":"string","description":"Unique identifier for the line item."},"externalLineIds":{"description":"External identifiers for the customer order lines, if applicable","type":"array","items":{"$ref":"#/components/schemas/ExternalIdDto"}},"itemId":{"type":"string","description":"Identifier for the product/item."},"itemType":{"type":"string","enum":["STOCK","SERVICE","MODEL","DEPOSIT","SERIALIZED"],"description":"Type of product"},"itemName":{"type":"string","description":"Name of the item."},"quantity":{"description":"Quantity of the item being ordered.","allOf":[{"$ref":"#/components/schemas/QuantityDto"}]},"unitPrice":{"type":"number","description":"The unit price of the item. Should always include tax.","format":"float"},"taxableGroupId":{"type":"string","description":"The tax group the item belongs to."},"depositAndFeeRuleIds":{"description":"A list of rule ids for deposits and fees.","type":"array","items":{"type":"string"}},"itemCategoryId":{"type":"string","description":"Identifier for the item's category."},"groupId":{"type":"string","description":"Identifier for the item's group (e.g., kit). Items in the same group will typically be refunded together."},"requiredDownpaymentUnitAmount":{"type":"number","description":"Amount of downpayment required per unit.","format":"float"},"refundedDownpaymentTotalAmount":{"type":"number","description":"The total refunded downpayment amount for this line.","format":"float"},"paidDownpaymentUnitAmount":{"type":"number","description":"Amount of downpayment paid per unit.","format":"float"},"isSubsidized":{"type":"boolean","description":"Indicates if the item is government subsidized."},"isBonusEligible":{"type":"boolean","description":"Indicates if the item is eligible for bonuses."},"cancelledQuantity":{"type":"number","description":"Number of items cancelled","format":"float"},"unitDiscounts":{"description":"Discounts applied per unit of the item.","type":"array","items":{"$ref":"#/components/schemas/UnitDiscountDto"}},"additionalProperties":{"description":"Additional properties or metadata associated with the line item.","type":"array","items":{"$ref":"#/components/schemas/AdditionalPropertiesDto"}}},"required":["lineItemId","itemId","quantity","unitPrice"]},"ProviderInfoDto":{"type":"object","properties":{"providerId":{"type":"string","description":"Identifier for the payment provider."},"terminalId":{"type":"string","description":"Identifier for the payment terminal."},"merchantId":{"type":"string","description":"Identifier for the merchant."}},"required":["providerId","terminalId","merchantId"]},"CardInfoDto":{"type":"object","properties":{"accountNumber":{"type":"string","description":"Masked account number."},"expirationDate":{"type":"string","description":"Card expiration date.","format":"date-time"},"cardNumberAlias":{"type":"string","description":"Alias for the card number."}}},"GiftCardTypeDto":{"type":"object","properties":{"id":{"type":"string","description":"Identifier for the gift card type."},"cardProductName":{"type":"string","description":"Name of the gift card product."},"virtualFlag":{"type":"boolean","description":"Indicates if the gift card is virtual."},"cardTypeCode":{"type":"string","description":"Code for the gift card type."}},"required":["id","cardProductName"]},"GiftCardInfoDto":{"type":"object","properties":{"currentBalance":{"type":"number","description":"Current balance on the gift card.","format":"float"},"giftCardActionType":{"type":"string","enum":["REDEEM","ACTIVATE","RECHARGE","BALANCE_INQUIRY"],"description":"Action performed on the gift card."},"giftCardType":{"description":"Type of the gift card used for the authorization.","allOf":[{"$ref":"#/components/schemas/GiftCardTypeDto"}]}},"required":["giftCardActionType"]},"AuthorizationDataDto":{"type":"object","properties":{"authorizationDataId":{"type":"string","description":"Identifier for authorization data."},"externalAuthorizationIds":{"description":"External identifiers for the authorization data, if applicable","type":"array","items":{"$ref":"#/components/schemas/ExternalIdDto"}},"success":{"type":"boolean","description":"Indicates if the authorization was successful."},"authorizationCode":{"type":"string","description":"The authorization code."},"transactionType":{"type":"string","enum":["PURCHASE","RESERVATION","CAPTURE","REFUND"],"description":"Type of transaction."},"verificationMethod":{"type":"string","description":"Method used for verification (e.g., PIN)."},"authorizationMethod":{"type":"string","description":"Method used for authorization (e.g., PHONE)."},"date":{"type":"string","description":"Date and time of authorization.","format":"date-time"},"amount":{"type":"number","description":"The authorized amount.","format":"float"},"referenceNumber":{"type":"string","description":"Reference number for the authorization."},"providerInfo":{"description":"Information about the payment provider.","allOf":[{"$ref":"#/components/schemas/ProviderInfoDto"}]},"cardInfo":{"description":"Information about the card used for the authorization.","allOf":[{"$ref":"#/components/schemas/CardInfoDto"}]},"giftCardInfo":{"description":"Information about the gift card used for the authorization.","allOf":[{"$ref":"#/components/schemas/GiftCardInfoDto"}]},"merchantReceiptText":{"type":"string","description":"Text to be printed on the merchant receipt."},"cardHolderReceiptText":{"type":"string","description":"Text to be printed on the cardholder receipt."}},"required":["success","transactionType","date","amount"]},"TenderDto":{"type":"object","properties":{"tenderLineItemId":{"type":"string","description":"Unique identifier for the tender line item."},"tenderId":{"type":"string","description":"Identifier for the tender type."},"externalTenderIds":{"description":"External identifiers for the tender, if applicable","type":"array","items":{"$ref":"#/components/schemas/ExternalIdDto"}},"customerAccountId":{"type":"string","description":"Customer account id for house accounts."},"amount":{"type":"number","description":"The amount of the tender.","format":"float"},"authorizationData":{"description":"Authorization data associated with the tender.","allOf":[{"$ref":"#/components/schemas/AuthorizationDataDto"}]},"additionalProperties":{"description":"Additional properties or metadata associated with the tender.","type":"array","items":{"$ref":"#/components/schemas/AdditionalPropertiesDto"}}},"required":["tenderLineItemId","tenderId","amount"]},"FulfillmentStatusDto":{"type":"object","properties":{"status":{"type":"string","enum":["CREATED","READY_FOR_PICKUP","CANCELLED","FULFILLED"],"description":"Fulfillment status."},"changedDateTime":{"type":"string","description":"Date and time when status changed.","format":"date-time"}},"required":["status"]},"FulfillmentLineItemDto":{"type":"object","properties":{"lineItemId":{"type":"string","description":"The line item id associated with this fulfillment."},"quantity":{"type":"number","description":"The quantity of the line item allocated to this fulfillment.","format":"float"},"readyForPickupDateTime":{"type":"string","description":"Date and time for when the item was ready for pickup","format":"date-time"},"status":{"description":"The current status of the fulfillment line item.","allOf":[{"$ref":"#/components/schemas/FulfillmentStatusDto"}]}},"required":["lineItemId","quantity","status"]},"FulfillmentTenderLineItemDto":{"type":"object","properties":{"tenderLineItemId":{"type":"string","description":"The tender line item id associated with this fulfillment."},"allocatedAmount":{"type":"number","description":"The amount from the tender allocated to this fulfillment.","format":"float"}},"required":["tenderLineItemId","allocatedAmount"]},"AddressDto":{"type":"object","properties":{"name":{"type":"string","description":"Name of the recipient."},"line1":{"type":"string","description":"First line of the address."},"streetNumber":{"type":"string","description":"Street number."},"apartmentNumber":{"type":"string","description":"Apartment number."},"city":{"type":"string","description":"City."},"countryCode":{"type":"string","description":"Two-letter country code (ISO 3166-1 alpha-2)."},"postalCode":{"type":"string","description":"Postal code."},"daytimePhoneNumber":{"type":"string","description":"Daytime phone number."},"eveningPhoneNumber":{"type":"string","description":"Evening phone number."},"email":{"type":"string","description":"Email address."}},"required":["name","line1","city","countryCode","postalCode"]},"FulfillmentDto":{"type":"object","properties":{"fulfillmentId":{"type":"string","description":"Unique identifier for the fulfillment."},"externalFulfillmentIds":{"description":"External identifier for the fulfillment, if applicable.","type":"array","items":{"$ref":"#/components/schemas/ExternalIdDto"}},"fulfillmentMethodId":{"type":"string","description":"Identifier for fulfillment method."},"fulfillmentMethod":{"type":"string","enum":["PICKUP_IN_STORE","HOME_DELIVERY_FROM_STORE","HOME_DELIVERY_FROM_WAREHOUSE"],"description":"Method of fulfillment."},"fulfillmentBusinessUnitId":{"type":"string","description":"Identifier for the business unit responsible for fulfillment."},"status":{"description":"The current status of the fulfillment.","allOf":[{"$ref":"#/components/schemas/FulfillmentStatusDto"}]},"shipmentTrackingNumber":{"type":"string","description":"Tracking number from external shipping provider"},"shipmentTrackingLink":{"type":"string","description":"Tracking link for external shipping provider"},"lineItems":{"description":"List of line items included in this fulfillment.","type":"array","items":{"$ref":"#/components/schemas/FulfillmentLineItemDto"}},"tenderLineItems":{"description":"List of tender line items included in this fulfillment.","type":"array","items":{"$ref":"#/components/schemas/FulfillmentTenderLineItemDto"}},"deliveryAddress":{"description":"Delivery address for the fulfillment, if applicable.","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"pickupDatetime":{"type":"string","description":"Scheduled pickup datetime for the fulfillment.","format":"date-time"}},"required":["fulfillmentId","fulfillmentMethod","status","lineItems"]},"CustomerDto":{"type":"object","properties":{"customerId":{"type":"string","description":"Unique identifier for the customer."},"externalCustomerIds":{"description":"External identifiers for the customer, if applicable","type":"array","items":{"$ref":"#/components/schemas/ExternalIdDto"}},"customerIdentification":{"type":"string","description":"Customer identification number."},"accountNumber":{"type":"string","description":"Customer account number."},"name":{"type":"string","description":"Full name of the customer."},"address":{"description":"Address of the customer.","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"territory":{"type":"string","description":"State or territory of the customer."}}},"CustomerOrderDto":{"type":"object","properties":{"customerOrderId":{"type":"string","description":"Unique identifier for the customer order."},"externalCustomerOrderIds":{"description":"External customer order IDs.","type":"array","items":{"$ref":"#/components/schemas/ExternalIdDto"}},"status":{"description":"Order status.","allOf":[{"$ref":"#/components/schemas/OrderStatusDto"}]},"currencyId":{"type":"string","description":"The currency of the order (e.g., EUR, USD)."},"orderOrigin":{"type":"string","description":"The origin of the order should identify where the order was created. Typical values are \"OMS\", \"ERP\", \"WEB\" or \"POS\"."},"cartId":{"type":"string","description":"Unique identifier for the cart."},"cartName":{"type":"string","description":"Name of the cart."},"operatorId":{"type":"string","description":"Unique identifier for the operator creating order."},"isReadOnly":{"type":"boolean","description":"If true, the order is not editable."},"loyalty":{"description":"Loyalty information associated with the order, such as member IDs or program identifiers. This service does not perform loyalty lookups; it assumes the client has already validated and retrieved any required loyalty data before submitting it.","allOf":[{"$ref":"#/components/schemas/LoyaltyDto"}]},"items":{"description":"Order items.","type":"array","items":{"$ref":"#/components/schemas/LineItemDto"}},"tenders":{"description":"Tenders.","type":"array","items":{"$ref":"#/components/schemas/TenderDto"}},"fulfillments":{"description":"Fulfillments.","type":"array","items":{"$ref":"#/components/schemas/FulfillmentDto"}},"customer":{"description":"Customer info.","allOf":[{"$ref":"#/components/schemas/CustomerDto"}]},"projectId":{"type":"string","description":"Project identifier associated with the order."}},"required":["status","currencyId","items"]},"SyncCustomerOrderResponseDto":{"type":"object","properties":{"customerOrderId":{"type":"string","description":"The customer order ID."},"correlationId":{"type":"string","description":"Correlation ID of the request."}},"required":["customerOrderId","correlationId"]}}},"security":[{"access-token":[]}]}