SOURCY / API REFERENCE / V1

Sourcing requests

Create a sourcing request, then update its items as the merchant makes their choices.

Download OpenAPI for Postman ↗

1. Choose your environment

Development is live. Production is not yet activated.

Server address
https://dev.ttk-agent.sourcy.ai
API base URL
https://dev.ttk-agent.sourcy.ai/api/v1
Create endpoint
https://dev.ttk-agent.sourcy.ai/api/v1/sourcing-requests

Use the complete endpoint in your requests. Opening / or /docs shows this page; /api/ alone is not an endpoint.

Set your token once

In your terminal, replace YOUR_API_TOKEN with the token shared by the team. Use the token for your selected environment. The commands below reuse this variable.

Terminal · bash / zsh
export API_TOKEN='YOUR_API_TOKEN'

Every API request needs Authorization: Bearer <token> and Content-Type: application/json. Both headers are included below. Never commit the real token or put it in frontend code.

2. Create a sourcing request

POST /api/v1/sourcing-requests → 201 Created

Required: external_id and merchant (both id and name). At signup you can omit items; it defaults to an empty list. This example creates two items.

Change external_id for each new request. Reusing the same merchant ID and external ID returns 409.

Complete cURL command
Loading example…

Save these values from the response

The response is the saved SR object itself, including all items, defaults, IDs and timestamps.

3. Update the same sourcing request

PATCH /api/v1/sourcing-requests/{srId} → 200 OK

Replace TTS-1, version: 1 and item id: 1 below with values from your saved response. This example selects an item and changes its quantity and customization.

Complete cURL command
Loading example…