Create Offers
const url = 'https://example.com/api/projects/example/offers';const options = {method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/projects/example/offers \ --header 'Content-Type: application/json' \ --data '{}'Create offer(s) for specific ProjectFileTarget(s) to specific users.
Expected payload (explicit role and stage required):
{ “offers”: [ { “project_file_target_id”: 1, “offered_to_user_id”: “<user.user_id UUIDv7>”, “role”: “translator”, “stage_index”: 0, // Optional pricing fields (Phase 1: Offer Customization) “pricing_model”: “per_word”, // ‘per_word’ | ‘per_character’ | ‘per_page’ “rate”: 0.15, // Rate per unit “currency”: “EUR”, // ISO 4217 code (defaults to EUR) “estimated_volume”: 5000, // word/char/page count “estimated_total”: 750.0, // Calculated: rate * volume (backend recalculates) “offer_expires_at”: 1706025600.0, // Unix timestamp (optional) “offer_valid_until_hours”: 168, // Hours until expiry (default 7 days) “pm_notes”: “Technical document, tight deadline” // Optional notes (max 1000 chars) } … ] }
Constraint: only one active offer per target at a time (offer/accepted/confirmed).
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Examplegenerated
{}Responses
Section titled “Responses”Successful Response
Examplegenerated
exampleValidation Error
object
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}