إنتقل إلى المحتوى الرئيسي

Download Order File

Streams the binary file deliverable for a purchased order item whose deliveryType is FILE. Strictly enforces that the parent order belongs to the authenticated API key user and is in PAID or DELIVERED state.

GET/api/v1/orders/ord_mock_file/items/item_mock_file_1/file
Target: https://api.example.com
curl -sS -X GET "https://api.example.com/api/v1/orders/ord_mock_file/items/item_mock_file_1/file" \
-H "x-api-key: YOUR_API_KEY" \
-H "Accept: application/json" \
--output deliverable.bin

Path Parameters​

ParameterTypeRequiredDescription
orderIdstringYesOwned order ID containing the file item.
itemIdstringYesSpecific OrderItem ID whose deliveryType is FILE.

Success Response (200 OK)​

Streams raw file bytes with response headers:

  • content-type: Stored MIME type (for example application/zip or text/plain)
  • content-length: Exact byte length
  • content-disposition: attachment; filename="<encoded-filename>"

Error Responses​

HTTPerror.codeCause
400VALIDATION_ERRORSpecified item is not a FILE delivery type
401UNAUTHORIZEDInvalid, revoked, or expired key
403FORBIDDEN / FRAUD_DETECTEDDisabled key, suspended user, or fraud block
404NOT_FOUNDOrder/item missing, belongs to another user, or stored file missing
429RATE_LIMITEDRate limit exceeded
500INTERNAL_ERRORUnexpected server error