repurch/ docs
Dashboard ↗repurch.com ↗

API reference

Settings

Settings groups the three brand-level configuration surfaces: the public brand profile, the legal billing entity that appears on every invoice, and the warehouse address book that anchors collection logistics.

Get the brand profile

Returns the brand-facing profile: display name, tagline, support contacts, logo URL, and accent colour.

GET/v1/partner/settings/brand
Auth: Authorization: Bearer … · Scopes: read

Example request

curl
curl https://api.repurch.com/v1/partner/settings/brand \
  -H "Authorization: Bearer re_pk_..."

Example response

json
{
  "brand_id": "furniture-co",
  "profile": {
    "display_name": "Furniture Co",
    "tagline": "Premium British sofas, made to last.",
    "description": "Furniture Co has been crafting sofas in Long Eaton since 1972.",
    "support_email": "support@furnitureco.example",
    "support_phone": "0115 555 0123",
    "logo_url": "https://cdn.repurch.com/brands/furniture-co/logo.svg",
    "accent_color": "#1F4FD9"
  }
}

Response fields

brand_id
string
Slug identifying the partner workspace.
profile.display_name
string
Public brand name shown across marketplace surfaces.
profile.tagline
string
Short positioning line.
profile.description
string
Long-form brand description.
profile.support_email
string
Customer-facing support email.
profile.support_phone
string
Customer-facing support phone.
profile.logo_url
string
Public URL of the brand logo.
profile.accent_color
string
Six-digit hex code used for charts and per-brand accents.

Errors

StatusCodeMessage
401missing_bearer_tokenNo Authorization: Bearer header provided.
401invalid_tokenToken is malformed, expired, or signed with the wrong key.
403forbiddenPartner admin role required.

Update the brand profile

Partial update of the brand profile. display_name is required on first save.

PATCH/v1/partner/settings/brand
Auth: Authorization: Bearer … · Scopes: write

Request body

display_name
stringrequired
Public brand name. Maximum 80 characters.
tagline
string
Short positioning line.
description
string
Long-form brand description.
support_email
string
Customer-facing support email.
support_phone
string
Customer-facing support phone.
logo_url
string
Public HTTPS URL of the brand logo.
accent_color
string
Six-digit hex code, e.g. #1F4FD9.

Example request

curl
curl -X PATCH https://api.repurch.com/v1/partner/settings/brand \
  -H "Authorization: Bearer re_pk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "display_name": "Furniture Co",
    "tagline": "Premium British sofas, made to last.",
    "support_email": "support@furnitureco.example",
    "accent_color": "#1F4FD9"
  }'

Example response

json
{
  "brand_id": "furniture-co",
  "profile": {
    "display_name": "Furniture Co",
    "tagline": "Premium British sofas, made to last.",
    "description": "Furniture Co has been crafting sofas in Long Eaton since 1972.",
    "support_email": "support@furnitureco.example",
    "support_phone": "0115 555 0123",
    "logo_url": "https://cdn.repurch.com/brands/furniture-co/logo.svg",
    "accent_color": "#1F4FD9"
  }
}

Errors

StatusCodeMessage
401missing_bearer_tokenNo Authorization: Bearer header provided.
401invalid_tokenToken is malformed, expired, or signed with the wrong key.
403forbiddenPartner admin role required.
400invalid_bodyBody must be a JSON object.
400validation_faileddisplay_name_required, display_name_too_long, support_email_invalid, or accent_color_invalid.

Get the billing entity

Returns the legal-entity details used on every remittance invoice. Distinct from the operational warehouses below.

GET/v1/partner/settings/billing
Auth: Authorization: Bearer … · Scopes: read

Example request

curl
curl https://api.repurch.com/v1/partner/settings/billing \
  -H "Authorization: Bearer re_pk_..."

Example response

json
{
  "brand_id": "furniture-co",
  "billing": {
    "company_name": "Furniture Co (Trading) Ltd",
    "address_1": "12 Industrial Way",
    "address_2": "",
    "city": "Long Eaton",
    "postcode": "NG10 2QQ",
    "country": "United Kingdom",
    "company_number": "07412358",
    "vat_number": "GB123456789",
    "invoice_email": "finance@furnitureco.example"
  }
}

Response fields

billing.company_name
string
Registered legal name.
billing.company_number
string
Companies House registration number.
billing.vat_number
string
VAT registration number, if applicable.
billing.invoice_email
string
Address where remittance PDFs and invoices are sent.

Errors

StatusCodeMessage
401missing_bearer_tokenNo Authorization: Bearer header provided.
401invalid_tokenToken is malformed, expired, or signed with the wrong key.
403forbiddenPartner admin role required.

Update the billing entity

Partial update. Send only the fields you want to change.

PATCH/v1/partner/settings/billing
Auth: Authorization: Bearer … · Scopes: write

Request body

company_name
string
Registered legal name.
address_1
string
First line of the registered address.
address_2
string
Optional second address line.
city
string
City of the registered address.
postcode
string
Postal code.
country
string
Country. Default United Kingdom.
company_number
string
Companies House registration number.
vat_number
string
VAT registration number, if applicable.
invoice_email
string
Address for remittance and invoice delivery.

Example request

curl
curl -X PATCH https://api.repurch.com/v1/partner/settings/billing \
  -H "Authorization: Bearer re_pk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "company_name": "Furniture Co (Trading) Ltd",
    "vat_number": "GB123456789",
    "invoice_email": "finance@furnitureco.example"
  }'

Example response

json
{
  "brand_id": "furniture-co",
  "billing": {
    "company_name": "Furniture Co (Trading) Ltd",
    "address_1": "12 Industrial Way",
    "city": "Long Eaton",
    "postcode": "NG10 2QQ",
    "country": "United Kingdom",
    "company_number": "07412358",
    "vat_number": "GB123456789",
    "invoice_email": "finance@furnitureco.example"
  }
}

Errors

StatusCodeMessage
401missing_bearer_tokenNo Authorization: Bearer header provided.
401invalid_tokenToken is malformed, expired, or signed with the wrong key.
403forbiddenPartner admin role required.
400invalid_bodyBody must be a JSON object.
400validation_failedOne or more fields failed validation.

List warehouses

Returns the warehouse address book for the brand. Exactly one warehouse is marked as default; new listings inherit its address unless overridden.

GET/v1/partner/settings/warehouses
Auth: Authorization: Bearer … · Scopes: read

Example request

curl
curl https://api.repurch.com/v1/partner/settings/warehouses \
  -H "Authorization: Bearer re_pk_..."

Example response

json
{
  "brand_id": "furniture-co",
  "warehouses": [
    {
      "id": "e3f5a2c4-9e2b-4f8a-b1d2-7c8e5f1a3b9d",
      "label": "Long Eaton DC",
      "contact_name": "Sam Patel",
      "contact_email": "warehouse@furnitureco.example",
      "contact_phone": "0115 555 0124",
      "address_1": "12 Industrial Way",
      "address_2": "",
      "city": "Long Eaton",
      "postcode": "NG10 2QQ",
      "country": "United Kingdom",
      "is_default": true
    }
  ]
}

Response fields

warehouses[].id
string
UUID. Pass as {id} in subsequent calls.
warehouses[].is_default
boolean
Exactly one warehouse is the default; the rest are alternates.

Errors

StatusCodeMessage
401missing_bearer_tokenNo Authorization: Bearer header provided.
401invalid_tokenToken is malformed, expired, or signed with the wrong key.
403forbiddenPartner admin role required.

Create a warehouse

Adds a warehouse to the address book. If this is the brand's first warehouse, it is automatically promoted to default.

POST/v1/partner/settings/warehouses
Auth: Authorization: Bearer … · Scopes: write

Request body

label
stringrequired
Short identifier shown in the partner dashboard (e.g. Long Eaton DC).
contact_name
string
On-site contact.
contact_email
string
On-site contact email.
contact_phone
string
On-site contact phone.
address_1
string
First line of the address.
address_2
string
Second address line.
city
string
City.
postcode
string
Postal code.
country
string
Country. Default United Kingdom.
is_default
boolean
If true, promote this warehouse to default and demote the previous default.

Example request

curl
curl https://api.repurch.com/v1/partner/settings/warehouses \
  -H "Authorization: Bearer re_pk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "label": "Long Eaton DC",
    "address_1": "12 Industrial Way",
    "city": "Long Eaton",
    "postcode": "NG10 2QQ",
    "is_default": true
  }'

Example response

json
{
  "warehouse": {
    "id": "e3f5a2c4-9e2b-4f8a-b1d2-7c8e5f1a3b9d",
    "label": "Long Eaton DC",
    "is_default": true,
    "address_1": "12 Industrial Way",
    "city": "Long Eaton",
    "postcode": "NG10 2QQ",
    "country": "United Kingdom"
  }
}

Errors

StatusCodeMessage
401missing_bearer_tokenNo Authorization: Bearer header provided.
401invalid_tokenToken is malformed, expired, or signed with the wrong key.
403forbiddenPartner admin role required.
400invalid_bodyBody must be a JSON object.
400validation_failedlabel_required or contact_email_invalid.

Update a warehouse

Partial update. Send only the fields you want to change.

PATCH/v1/partner/settings/warehouses/{id}
Auth: Authorization: Bearer … · Scopes: write

Path parameters

id
stringrequired
Warehouse UUID.

Request body

any field from POST /v1/partner/settings/warehouses
varies
Send only the fields you want to change.

Example request

curl
curl -X PATCH https://api.repurch.com/v1/partner/settings/warehouses/e3f5a2c4-9e2b-4f8a-b1d2-7c8e5f1a3b9d \
  -H "Authorization: Bearer re_pk_..." \
  -H "Content-Type: application/json" \
  -d '{ "label": "Long Eaton DC (Bay 1-12)" }'

Example response

json
{
  "warehouse": {
    "id": "e3f5a2c4-9e2b-4f8a-b1d2-7c8e5f1a3b9d",
    "label": "Long Eaton DC (Bay 1-12)",
    "is_default": true,
    "address_1": "12 Industrial Way",
    "city": "Long Eaton",
    "postcode": "NG10 2QQ",
    "country": "United Kingdom"
  }
}

Errors

StatusCodeMessage
401missing_bearer_tokenNo Authorization: Bearer header provided.
401invalid_tokenToken is malformed, expired, or signed with the wrong key.
403forbiddenPartner admin role required.
400invalid_bodyBody must be a JSON object.
400validation_failedlabel_required or contact_email_invalid.
404warehouse_not_foundWarehouse not found.

Delete a warehouse

Removes a warehouse from the address book. If the deleted warehouse was the default, the first remaining warehouse is promoted.

DELETE/v1/partner/settings/warehouses/{id}
Auth: Authorization: Bearer … · Scopes: write

Path parameters

id
stringrequired
Warehouse UUID.

Example request

curl
curl -X DELETE https://api.repurch.com/v1/partner/settings/warehouses/e3f5a2c4-9e2b-4f8a-b1d2-7c8e5f1a3b9d \
  -H "Authorization: Bearer re_pk_..."

Example response

json
{
  "deleted": true
}

Errors

StatusCodeMessage
401missing_bearer_tokenNo Authorization: Bearer header provided.
401invalid_tokenToken is malformed, expired, or signed with the wrong key.
403forbiddenPartner admin role required.
404warehouse_not_foundWarehouse not found.

Promote a warehouse to default

Marks the named warehouse as default and demotes the previous one. Returns the full updated warehouse list.

POST/v1/partner/settings/warehouses/{id}/set-default
Auth: Authorization: Bearer … · Scopes: write

Path parameters

id
stringrequired
Warehouse UUID.

Example request

curl
curl -X POST https://api.repurch.com/v1/partner/settings/warehouses/e3f5a2c4-9e2b-4f8a-b1d2-7c8e5f1a3b9d/set-default \
  -H "Authorization: Bearer re_pk_..."

Example response

json
{
  "warehouses": [
    {
      "id": "e3f5a2c4-9e2b-4f8a-b1d2-7c8e5f1a3b9d",
      "label": "Long Eaton DC",
      "is_default": true
    },
    {
      "id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
      "label": "Burton-on-Trent overflow",
      "is_default": false
    }
  ]
}

Errors

StatusCodeMessage
401missing_bearer_tokenNo Authorization: Bearer header provided.
401invalid_tokenToken is malformed, expired, or signed with the wrong key.
403forbiddenPartner admin role required.
404warehouse_not_foundWarehouse not found.