Flavours API
Bulk jobImport

Import Customers Upload URL

POST
/api/v2/bulk/customers/import/upload-url

Get a presigned S3 POST for uploading a large customer spreadsheet directly to storage.

AuthorizationBearer <token>

You can retrieve your token by logging in.

In: header

Header Parameters

X-API-Version*string

API contract version to target. See the Changelog for what changed in each version.

Default"2.0.0"
Value in"2.3.0" | "2.2.0" | "2.1.0" | "2.0.0"

Request Body

application/json

filename?string

This field is required when extension is not present. Must not be greater than 255 characters.

content_type?|

Must not be greater than 255 characters.

size?|

Must be at least 1. Must not be greater than 20971520.

extension*string
Value in"csv" | "xls" | "xlsx"
market_id?|

Must match an existing stored value.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.flavours.sa/dev/api/v2/bulk/customers/import/upload-url" \  -H "X-API-Version: 2.3.0" \  -H "Content-Type: application/json" \  -d '{    "extension": "csv"  }'
{
  "meta": {
    "code": 200,
    "status": "success",
    "message": "Customer import upload URL generated successfully."
  },
  "data": {
    "strategy": "presigned",
    "url": "https://flavours-docs-bucket.s3.amazonaws.com",
    "attributes": {
      "action": "https://flavours-docs-bucket.s3.amazonaws.com",
      "method": "POST",
      "enctype": "multipart/form-data"
    },
    "fields": {
      "acl": "private",
      "key": "imports/quarantine/74e28a92-8d86-48e6-b7d7-455be2379d19/e56ad520-8373-4bd6-969b-228a59eb945f/source.xlsx",
      "X-Amz-Credential": "AKIAEXAMPLE/20260823/us-east-1/s3/aws4_request",
      "X-Amz-Algorithm": "AWS4-HMAC-SHA256",
      "X-Amz-Date": "20260823T005808Z",
      "Policy": "eyJleHBpcmF0aW9uIjoiMjAyNi0wOC0yM1QwMToxMzowOFoiLCJjb25kaXRpb25zIjpbeyJhY2wiOiJwcml2YXRlIn0seyJidWNrZXQiOiJmbGF2b3Vycy1kb2NzLWJ1Y2tldCJ9LFsiZXEiLCIka2V5IiwiaW1wb3J0c1wvcXVhcmFudGluZVwvNzRlMjhhOTItOGQ4Ni00OGU2LWI3ZDctNDU1YmUyMzc5ZDE5XC9lNTZhZDUyMC04MzczLTRiZDYtOTY5Yi0yMjhhNTllYjk0NWZcL3NvdXJjZS54bHN4Il0sWyJjb250ZW50LWxlbmd0aC1yYW5nZSIsMCwyMDk3MTUyMF0seyJYLUFtei1EYXRlIjoiMjAyNjA4MjNUMDA1ODA4WiJ9LHsiWC1BbXotQ3JlZGVudGlhbCI6IkFLSUFFWEFNUExFXC8yMDI2MDgyM1wvdXMtZWFzdC0xXC9zM1wvYXdzNF9yZXF1ZXN0In0seyJYLUFtei1BbGdvcml0aG0iOiJBV1M0LUhNQUMtU0hBMjU2In1dfQ==",
      "X-Amz-Signature": "b2a446ef450eac0333f11abcec00fd748e695f592a409020dfc0c94ca854baff"
    },
    "key": "imports/quarantine/74e28a92-8d86-48e6-b7d7-455be2379d19/e56ad520-8373-4bd6-969b-228a59eb945f/source.xlsx",
    "max_bytes": 20971520
  }
}
{
  "meta": {
    "code": 401,
    "status": "error",
    "message": "Unauthenticated."
  },
  "data": null
}
{
  "meta": {
    "code": 403,
    "status": "error",
    "message": "Unauthorized."
  },
  "data": null
}
{
  "meta": {
    "code": 404,
    "status": "error",
    "message": "Resource not found."
  },
  "data": null
}
{
  "meta": {
    "code": 500,
    "status": "error",
    "message": "Internal server error."
  },
  "data": null
}