OrdersOrder Drafts
Convert order draft to order
POST
/v1/order-drafts/{draftId}/convertConvert order draft to order. A successful request returns HTTP 200 with the documented response body.
Authorization
bearerAuth AuthorizationBearer <token>
OAuth2 access token issued by Ecomiq Auth.
In: header
Path Parameters
draftId*string
Identifier of the order draft.
Header Parameters
x-Store-Id?string
Store the request acts on. Not needed when the token is bound to a store.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/v1/order-drafts/7204558912004325301/convert" \ -H "x-Store-Id: <store-id>" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{ "invoiceType": "ticket" }'{ "orderId": "7204558912004325301", "orderGroup": "example", "orderIds": [ "example" ], "order": { "id": "7204558912004325301", "storeId": "7204558912004325301", "cartId": "7204558912004325301", "orderDraftId": "7204558912004325301", "customerId": "7204558912004325301", "orderNumber": "ORD-2026-0001", "orderShortId": "7204558912004325301", "couponCode": "example_code", "source": "example", "sourceIdentifier": "example", "orderGroup": "example", "notes": "Example note.", "phone": "+51987654321", "email": "andrea@example.com", "firstName": "Andrea", "lastName": "Ramos", "identificationType": "example", "identificationNumber": "example", "entityTaxId": "7204558912004325301", "entityName": "Comercial Lima SAC", "promotion": "example", "shippingPromotion": "example", "totalSkus": 1, "shippingConnectionId": "7204558912004325301", "orderDate": "2026-08-01T15:30:00Z", "preOrderDate": "2026-08-01T15:30:00Z", "confirmedAt": "2026-08-01T15:30:00Z", "inProgressAt": "2026-08-01T15:30:00Z", "paymentAt": "2026-08-01T15:30:00Z", "shippingAt": "2026-08-01T15:30:00Z", "closedAt": "2026-08-01T15:30:00Z", "cancelledAt": "2026-08-01T15:30:00Z", "completedAt": "2026-08-01T15:30:00Z", "conciliationAt": "2026-08-01T15:30:00Z", "invoicedAt": "2026-08-01T15:30:00Z", "inTransitAt": "2026-08-01T15:30:00Z", "pickupAt": "2026-08-01T15:30:00Z", "returnedAt": "2026-08-01T15:30:00Z", "invalidAt": "2026-08-01T15:30:00Z", "status": "new", "state": "open", "fulfillmentStatus": "unfulfilled", "returnStatus": "none", "shippingType": "example", "invoiceType": "ticket", "sellerId": "7204558912004325301", "tags": "example", "integrationTags": "example", "cancelReason": "Example note.", "cancelReasonType": "Example note.", "currencyCode": "PEN", "subTotal": 1, "discount": 1, "shipping": 1, "extraShippingCost": 1, "tax": 1, "warranty": 1, "total": 1, "userAssigned": "example", "attachments": "example", "invoiceNumber": "example", "invoiceLink": "example", "isSplitSellerItem": false, "hasRefund": false, "hasTrackingNumber": false, "billingAddress": { "address1": "example", "city": "example", "countryCode": "PE", "name": "Example resource", "company": "example", "address2": "example", "province": "example", "postalCode": "example_code" }, "shippingAddress": { "address1": "example", "city": "example", "countryCode": "PE", "name": "Example resource", "company": "example", "address2": "example", "province": "example", "postalCode": "example_code" }, "attribution": { "campaignId": "7204558912004325301", "utmSource": "example", "utmMedium": "example", "utmCampaign": "example", "referralCode": "example_code" }, "instructions": { "giftMessage": "example", "specialInstructions": "example" }, "items": [ { "id": "7204558912004325301", "externalItemId": "7204558912004325301", "productId": "7204558912004325301", "categoryId": "7204558912004325301", "brandId": "7204558912004325301", "sellerId": "7204558912004325301", "shippingProfileId": "7204558912004325301", "variantId": "7204558912004325301", "skuId": "7204558912004325301", "sku": "SKU-001", "locationId": "7204558912004325301", "title": "Example title", "subtitle": "Example title", "thumbnail": "example", "productTitle": "Example title", "productDescription": "Example description.", "productType": "example", "productCollection": "example", "productHandle": "example", "variantSku": "SKU-001", "variantBarcode": "7751234567890", "variantTitle": "Example title", "variantOptionValues": {}, "brand": "example", "category": "example", "height": 1, "length": 1, "width": 1, "weight": 1, "weightUnit": "kilogram", "quantity": 1, "quantityRemaining": 1, "quantityToDispatch": 1, "quantityDispatched": 1, "quantityDelivered": 1, "quantityRefunded": 1, "quantityReturned": 1, "unitPrice": 1, "subTotal": 1, "discount": 1, "shipping": 1, "tax": 1, "warranty": 1, "total": 1, "sellerCommissionId": "7204558912004325301", "commissionSource": "seller", "productCommissionPercent": 1, "freightCommissionPercent": 1, "fixedFee": 1, "commissionBaseAmount": 1, "productCommissionAmount": 1, "freightCommissionBaseAmount": 1, "freightCommissionAmount": 1, "commissionAmount": 1, "requiresShipping": false, "isDiscountable": false, "isGiftcard": false, "isTaxInclusive": false, "isCustomPrice": false, "shippingConnectionId": "7204558912004325301", "shippingProviderName": "Example resource", "shippingCostId": "7204558912004325301", "shippingCostName": "Example resource", "invoiceNumber": "example", "invoiceLink": "example", "trackingNumber": "example", "trackingLink": "example", "orderItemStatus": "new", "inProgressAt": "2026-08-01T15:30:00Z", "paymentAt": "2026-08-01T15:30:00Z", "shippingAt": "2026-08-01T15:30:00Z", "closedAt": "2026-08-01T15:30:00Z", "cancelledAt": "2026-08-01T15:30:00Z", "completedAt": "2026-08-01T15:30:00Z", "conciliationAt": "2026-08-01T15:30:00Z", "invoicedAt": "2026-08-01T15:30:00Z", "inTransitAt": "2026-08-01T15:30:00Z", "pickupAt": "2026-08-01T15:30:00Z", "returnedAt": "2026-08-01T15:30:00Z", "deliveredAt": "2026-08-01T15:30:00Z", "modifiers": [ { "id": "7204558912004325301", "modifierGroupId": "7204558912004325301", "modifierGroupName": "Example resource", "modifierOptionId": "7204558912004325301", "modifierOptionName": "Example resource", "priceDelta": 1 } ], "metadata": {}, "createdOn": "2026-08-01T15:30:00Z", "updatedOn": "2026-08-01T15:30:00Z" } ], "shippingMethods": [ { "id": "7204558912004325301", "name": "Example resource", "description": "Example description.", "subtotal": 1, "discountTotal": 1, "taxTotal": 1, "total": 1, "isTaxInclusive": false, "sellerId": "7204558912004325301", "shippingProfileId": "7204558912004325301", "shippingMethodId": "7204558912004325301", "connectionId": "7204558912004325301", "providerName": "Example resource", "trackingCode": "example_code", "estimatedDays": 1, "zoneCode": "example_code", "locationId": "7204558912004325301", "pickupPointId": "7204558912004325301", "scheduledDate": "2026-08-01", "scheduledTime": "09:00:00Z", "data": {} } ], "payments": [ { "id": "7204558912004325301", "paymentMethod": "example", "paymentCode": "example_code", "amount": 1, "cardNumber": "example", "cardType": "example", "installments": 1, "authorizationCode": "example_code", "transactionReference": "example", "providerId": "7204558912004325301", "paymentTransactionId": "7204558912004325301", "paymentStatus": "example", "receiptUrl": "https://example.com/resource", "metadata": {}, "refundedAmount": 1, "refundableAmount": 1 } ], "trackings": [ { "id": "7204558912004325301", "orderItemId": "7204558912004325301", "title": "Example title", "content": "example", "type": "note", "userId": "2f40d7e4-3d9c-4ab2-b04e-7a6a132db821", "email": "andrea@example.com", "ip": "example", "createdOn": "2026-08-01T15:30:00Z", "createdBy": "2f40d7e4-3d9c-4ab2-b04e-7a6a132db821" } ], "packageItems": [ { "id": "7204558912004325301", "carrierId": "7204558912004325301", "carrierName": "Example resource", "trackingNumber": "example", "trackingLink": "example", "orderItemId": "7204558912004325301", "sku": "SKU-001", "packages": 1, "weight": 1, "quantity": 1, "serviceType": "example", "serviceCost": 1, "from": "example", "to": "example", "partialTracking": false, "invoiceNumber": "example", "packageType": "delivery", "packageStatus": "readyToPickUp", "createdOn": "2026-08-01T15:30:00Z", "updatedOn": "2026-08-01T15:30:00Z" } ], "transactions": [ { "id": "7204558912004325301", "type": "in", "amount": 1, "paymentMethod": "example", "referenceId": "7204558912004325301", "referenceType": "paymentTransaction", "transactionReference": "example", "transactionReferenceDocumentLink": "example", "content": "example", "createdOn": "2026-08-01T15:30:00Z", "createdBy": "2f40d7e4-3d9c-4ab2-b04e-7a6a132db821" } ], "createdOn": "2026-08-01T15:30:00Z", "updatedOn": "2026-08-01T15:30:00Z" }}