openapi: 3.0.3 info: title: Admin Account / Address Digital Downloads API contact: name: Spree Commerce url: https://spreecommerce.org email: hello@spreecommerce.org description: "Spree Admin API v3 - Administrative API for managing products, orders, and store settings.\n\n## Authentication\n\nThe Admin API requires a secret API key passed in the `x-spree-api-key` header.\nSecret API keys can be generated in the Spree admin dashboard.\n\n## Response Format\n\nAll responses are JSON. List endpoints return paginated responses with `data` and `meta` keys.\nSingle resource endpoints return a flat JSON object.\n\n## Resource IDs\n\nEvery resource is identified by an opaque string ID (e.g. `prod_86Rf07xd4z`,\n`variant_k5nR8xLq`, `or_UkLWZg9DAJ`). Use these IDs everywhere — URL paths,\nrequest bodies, and Ransack filters all accept them directly.\n\n## Error Handling\n\nErrors return a consistent format:\n```json\n{\n \"error\": {\n \"code\": \"validation_error\",\n \"message\": \"Validation failed\",\n \"details\": { \"name\": [\"can't be blank\"] }\n }\n}\n```\n" version: v3 servers: - url: http://{defaultHost} variables: defaultHost: default: localhost:3000 tags: - name: Digital Downloads paths: /api/v2/storefront/digitals/{token}: parameters: - schema: type: string example: 4WaA5vjMbnivskav2rMPGKzt name: token in: path required: true description: Use the token from the digital link. get: summary: Download a Digital Asset tags: - Digital Downloads responses: '200': description: 200 Success - Returns the digital asset. content: image/jpeg: schema: type: object format: binary image/gif: schema: type: object format: binary image/svg+xml: schema: type: object format: binary image/bmp: schema: type: object format: binary image/tiff: schema: type: object format: binary image/png: schema: type: object format: binary video/mpeg: schema: type: object format: binary application/gzip: schema: type: object format: binary application/zip: schema: type: object format: binary application/pdf: schema: type: object format: binary font/woff: schema: type: object format: binary font/woff2: schema: type: object format: binary font/otf: schema: type: object format: binary font/ttf: schema: type: object format: binary text/plain: schema: type: object format: binary '403': $ref: '#/components/responses/403Forbidden' operationId: get-digitals description: 'This endpoint allows you to download a digital item using the unique digital_link token. The digital_link token value can be found by including `line_items.digital_links` in a completed order lookup. Use the **Retrieve an Order Status** endpoint found under the Order Status tab, or the **Retrieve an Order** endpoint found under the Account / Orders tab to perform a completed order lookup. Depending on the store that the item was purchased in, downloads may be restricted to a set number of days since the purchase was made. Additionally, the number of times a download link can be used may be restricted. If you are not authorized to perform the download due to the download limit restrictions mentioned above, a 403 response will be returned.' components: responses: 403Forbidden: description: 403 Forbidden - You are not authorized to access this page. content: application/vnd.api+json: schema: properties: error: type: string example: You are not authorized to access this page. default: You are not authorized to access this page. examples: 403 Example: value: error: You are not authorized to access this page. securitySchemes: api_key: type: apiKey name: x-spree-api-key in: header description: Secret API key for admin access bearer_auth: type: http scheme: bearer bearerFormat: JWT description: JWT token for admin user authentication x-tagGroups: - name: Authentication tags: - Authentication - name: Products & Catalog tags: - Products - Variants - Option Types - Custom Fields - Channels - name: Pricing tags: - Pricing - Markets - name: Orders & Fulfillment tags: - Orders - Payments - Fulfillments - Refunds - name: Customers tags: - Customers - Customer Groups - name: Promotions & Gift Cards tags: - Promotions - Gift Cards - name: Data tags: - Exports - name: Configuration tags: - Settings - Stock Locations - Payment Methods - Staff - API Keys - Allowed Origins - Webhooks