{"openapi":"3.1.0","info":{"title":"Crestivo Freight API","version":"v1","description":"Integrate US domestic LTL freight with your own software. Create quotes, request rates, follow shipment progress, and retrieve invoices. API access and operational capabilities depend on your account. Amounts are integer cents in USD.","contact":{"email":"operations@crestivofreight.com"}},"servers":[{"url":"https://app.crestivofreight.com/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Your key, as `Authorization: Bearer crf_live_…`."}},"schemas":{"Error":{"type":"object","required":["error","code"],"properties":{"error":{"type":"string"},"code":{"type":"string"}}},"Quote":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"state":{"type":"string"},"revision":{"type":"integer"},"offers":{"type":"array","items":{"$ref":"#/components/schemas/Offer"}}}},"Offer":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"carrier":{"type":"string"},"service":{"type":"string"},"sellCents":{"type":"integer"},"transitDays":{"type":"integer"},"expiresAt":{"type":"string","format":"date-time"}}},"Shipment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"number":{"type":"string"},"carrier":{"type":"string"},"bookingState":{"type":"string","description":"Check this after creating a booking request. Carrier confirmation is asynchronous."},"movementState":{"type":"string"},"cancellationState":{"type":"string"},"pro":{"type":["string","null"]}}},"QuoteFreight":{"type":"object","properties":{"origin":{"type":"object","properties":{"company":{"default":"","type":"string","maxLength":500},"address1":{"default":"","type":"string","maxLength":500},"address2":{"type":"string","maxLength":500},"city":{"default":"","type":"string","maxLength":500},"state":{"default":"","type":"string","maxLength":50},"postalCode":{"default":"","type":"string","maxLength":20},"country":{"default":"US","type":"string","const":"US"},"contact":{"default":"","type":"string","maxLength":500},"phone":{"default":"","type":"string","maxLength":500},"email":{"default":"","type":"string","maxLength":320},"hours":{"default":"","type":"string","maxLength":500},"appointmentWindow":{"type":"object","properties":{"from":{"type":"string","maxLength":40,"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"to":{"type":"string","maxLength":40,"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["from","to"],"additionalProperties":false},"timezone":{"default":"America/Chicago","type":"string","maxLength":100},"notes":{"default":"","type":"string","maxLength":2000},"accessorials":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","enum":["AIRPORT","APPOINTMENT","INSIDE_SERVICE","LIFTGATE","LIMITED_ACCESS","RESIDENTIAL","SORT_AND_SEGREGATE","TRADE_SHOW","PROTECT_FROM_FREEZE","NOTIFY_BEFORE_DELIVERY"]}}}},"destination":{"type":"object","properties":{"company":{"default":"","type":"string","maxLength":500},"address1":{"default":"","type":"string","maxLength":500},"address2":{"type":"string","maxLength":500},"city":{"default":"","type":"string","maxLength":500},"state":{"default":"","type":"string","maxLength":50},"postalCode":{"default":"","type":"string","maxLength":20},"country":{"default":"US","type":"string","const":"US"},"contact":{"default":"","type":"string","maxLength":500},"phone":{"default":"","type":"string","maxLength":500},"email":{"default":"","type":"string","maxLength":320},"hours":{"default":"","type":"string","maxLength":500},"appointmentWindow":{"type":"object","properties":{"from":{"type":"string","maxLength":40,"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"to":{"type":"string","maxLength":40,"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["from","to"],"additionalProperties":false},"timezone":{"default":"America/Chicago","type":"string","maxLength":100},"notes":{"default":"","type":"string","maxLength":2000},"accessorials":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","enum":["AIRPORT","APPOINTMENT","INSIDE_SERVICE","LIFTGATE","LIMITED_ACCESS","RESIDENTIAL","SORT_AND_SEGREGATE","TRADE_SHOW","PROTECT_FROM_FREEZE","NOTIFY_BEFORE_DELIVERY"]}}}},"pickupDate":{"type":"string","maxLength":20},"reference":{"default":"","type":"string","maxLength":150},"instructions":{"default":"","type":"string","maxLength":2000},"declaredValueCents":{"type":"integer","minimum":0,"maximum":100000000},"handlingUnits":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"quantity":{"type":"integer","minimum":0,"maximum":100},"packaging":{"type":"string","enum":["PALLET","BAG","BOX","BUNDLE","CRATE","DRUM","SKID","ROLL","CARTON","OTHER"]},"weight":{"type":"number","minimum":0,"maximum":100000},"weightUnit":{"type":"string","enum":["LB","KG"]},"weightBasis":{"type":"string","enum":["PER_UNIT","GROUP_TOTAL"]},"length":{"type":"number","minimum":0,"maximum":1500},"width":{"type":"number","minimum":0,"maximum":1500},"height":{"type":"number","minimum":0,"maximum":1500},"dimensionUnit":{"type":"string","enum":["IN","CM"]},"stackable":{"type":"boolean"},"commodities":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"description":{"default":"","type":"string","maxLength":500},"pieces":{"default":0,"type":"integer","minimum":0,"maximum":100000},"freightClass":{"type":"string"},"nmfc":{"default":"","type":"string","maxLength":500},"classificationSource":{"default":"","type":"string","maxLength":500},"hazmat":{"type":"boolean"},"hazmatDetails":{"default":"","type":"string","maxLength":3000}},"required":["freightClass","hazmat"]}}},"required":["quantity","packaging","weight","weightUnit","weightBasis","length","width","height","dimensionUnit","stackable","commodities"]}}},"required":["origin","destination","pickupDate","declaredValueCents","handlingUnits"]},"BookingDetails":{"type":"object","properties":{"origin":{"type":"object","properties":{"company":{"default":"","type":"string","maxLength":500},"address1":{"default":"","type":"string","maxLength":500},"address2":{"type":"string","maxLength":500},"city":{"default":"","type":"string","maxLength":500},"state":{"default":"","type":"string"},"postalCode":{"type":"string","pattern":"^([0-9]{5})(?:-[0-9]{4})?$"},"country":{"default":"US","type":"string","const":"US"},"contact":{"default":"","type":"string","maxLength":500},"phone":{"default":"","type":"string","maxLength":500},"email":{"default":"","anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"string","const":""}]},"hours":{"default":"","type":"string","maxLength":500},"appointmentWindow":{"type":"object","properties":{"from":{"type":"string","maxLength":40,"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"to":{"type":"string","maxLength":40,"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["from","to"],"additionalProperties":false},"timezone":{"default":"America/Chicago","type":"string","minLength":1,"maxLength":100},"notes":{"default":"","type":"string","maxLength":2000},"accessorials":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","enum":["AIRPORT","APPOINTMENT","INSIDE_SERVICE","LIFTGATE","LIMITED_ACCESS","RESIDENTIAL","SORT_AND_SEGREGATE","TRADE_SHOW","PROTECT_FROM_FREEZE","NOTIFY_BEFORE_DELIVERY"]}}},"required":["postalCode"],"additionalProperties":false},"destination":{"type":"object","properties":{"company":{"default":"","type":"string","maxLength":500},"address1":{"default":"","type":"string","maxLength":500},"address2":{"type":"string","maxLength":500},"city":{"default":"","type":"string","maxLength":500},"state":{"default":"","type":"string"},"postalCode":{"type":"string","pattern":"^([0-9]{5})(?:-[0-9]{4})?$"},"country":{"default":"US","type":"string","const":"US"},"contact":{"default":"","type":"string","maxLength":500},"phone":{"default":"","type":"string","maxLength":500},"email":{"default":"","anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"string","const":""}]},"hours":{"default":"","type":"string","maxLength":500},"appointmentWindow":{"type":"object","properties":{"from":{"type":"string","maxLength":40,"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"to":{"type":"string","maxLength":40,"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["from","to"],"additionalProperties":false},"timezone":{"default":"America/Chicago","type":"string","minLength":1,"maxLength":100},"notes":{"default":"","type":"string","maxLength":2000},"accessorials":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","enum":["AIRPORT","APPOINTMENT","INSIDE_SERVICE","LIFTGATE","LIMITED_ACCESS","RESIDENTIAL","SORT_AND_SEGREGATE","TRADE_SHOW","PROTECT_FROM_FREEZE","NOTIFY_BEFORE_DELIVERY"]}}},"required":["postalCode"],"additionalProperties":false},"reference":{"type":"string","maxLength":150},"instructions":{"type":"string","maxLength":2000}},"required":["origin","destination"],"additionalProperties":false},"Invoice":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"number":{"type":"string"},"issuedAt":{"type":"string","format":"date-time"},"dueAt":{"type":"string","format":"date","description":"Date printed at issuance"},"loadDueAt":{"type":["string","null"],"format":"date-time","description":"Effective deadline under the customer’s load payment terms"},"loadOverdueAt":{"type":["string","null"],"format":"date-time"},"loadPaymentDue":{"type":"boolean"},"totalCents":{"type":"integer"},"paidCents":{"type":"integer"},"outstandingCents":{"type":"integer"}}},"Amendment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"shipmentId":{"type":"string","format":"uuid"},"state":{"type":"string","enum":["CUSTOMER_APPROVAL_REQUIRED","SUBMITTED","CONFIRMED","REJECTED","OUTCOME_UNKNOWN","MANUAL_ACTION_REQUIRED"]},"newSellCents":{"type":"integer","description":"The proposed price. Send this back as `acceptedSellCents`."},"baseRevision":{"type":"integer"}}},"Claim":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"shipmentId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["LOSS","DAMAGE","SHORTAGE"]},"status":{"type":"string"},"amountCents":{"type":"integer"},"approvedCents":{"type":"integer"},"deniedCents":{"type":"integer"},"incidentDate":{"type":"string","format":"date"}}},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"description":{"type":"string"},"eventTypes":{"oneOf":[{"type":"string","enum":["all"]},{"type":"array","items":{"type":"string","enum":["claim.opened","claim.updated","invoice.issued","quote.manual_offer_ready","shipment.amendment_proposed","shipment.booked","shipment.booking_failed","shipment.booking_unconfirmed","shipment.cancellation_pending","shipment.document_available","shipment.issue_reported","shipment.status_changed"]}}]},"disabled":{"type":"boolean"},"secret":{"type":"string","description":"Returned only when the endpoint is created."}}},"WebhookEvent":{"type":"object","required":["id","type","occurredAt","data"],"properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["claim.opened","claim.updated","invoice.issued","quote.manual_offer_ready","shipment.amendment_proposed","shipment.booked","shipment.booking_failed","shipment.booking_unconfirmed","shipment.cancellation_pending","shipment.document_available","shipment.issue_reported","shipment.status_changed"]},"occurredAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"resource":{"type":"string","enum":["shipment","quote","invoice","claim"]},"id":{"type":"string","format":"uuid"}}}}}}},"paths":{"/version":{"get":{"summary":"API version","security":[],"responses":{"200":{"description":"Version","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/me":{"get":{"summary":"The account this key belongs to and the member it acts as","responses":{"200":{"description":"Identity","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/quotes":{"get":{"summary":"List quotes, newest first","parameters":[{"name":"pageSize","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"The opaque nextCursor from the previous page. Keep the filters the same."},{"name":"search","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Quotes","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Quote"}},"nextCursor":{"type":["string","null"]}}}}}}}},"post":{"summary":"Create a quote","description":"Send the freight. Commodity descriptions are optional for rates and required for booking. Pass `idempotencyKey` and a retry after a lost response returns the original quote instead of creating a second.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["freight"],"properties":{"freight":{"$ref":"#/components/schemas/QuoteFreight"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}},"400":{"description":"Invalid freight","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/quotes/{id}/rates":{"post":{"summary":"Request rates for a quote","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"description":"Returns the quote state and any offers. Check each offer’s expiry before requesting booking.","responses":{"200":{"description":"Quote and rating outcome","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}}}}},"/quotes/{id}":{"get":{"summary":"Read one quote and its offers","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Quote","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}}}}},"/shipments":{"get":{"summary":"List shipments, newest first","parameters":[{"name":"pageSize","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"The opaque nextCursor from the previous page. Keep the filters the same."},{"name":"search","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Shipments","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Shipment"}},"nextCursor":{"type":["string","null"]},"summary":{"type":"object"}}}}}}}},"post":{"summary":"Request booking for an offer","description":"Use a quote with a description for each commodity. If any description is missing, create and rate a completed quote before booking. Send the exact current sell price and an idempotency key. When adding full stop details at booking, supply the quote revision and retain the rated ZIP codes, countries and accessorials. Read the returned shipment to follow confirmation.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["quoteId","offerId","acceptedSellCents","termsAccepted","idempotencyKey"],"dependentRequired":{"bookingDetails":["revision"]},"properties":{"quoteId":{"type":"string","format":"uuid"},"offerId":{"type":"string","format":"uuid"},"acceptedSellCents":{"type":"integer","minimum":1},"termsAccepted":{"type":"boolean","const":true},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150},"revision":{"type":"integer","minimum":1},"bookingDetails":{"$ref":"#/components/schemas/BookingDetails"}}}}}},"responses":{"201":{"description":"Booking request recorded. Check bookingState for carrier confirmation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shipment"}}}},"409":{"description":"Booking is blocked, or the offer, quote revision or price changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/shipments/{id}":{"get":{"summary":"Read one shipment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Shipment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shipment"}}}}}}},"/shipments/{id}/documents":{"get":{"summary":"List metadata for available customer documents","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Available customer document metadata","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/shipments/{id}/cancel":{"post":{"summary":"Queue a shipment cancellation request","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"description":"Allowed only before pickup, on a confirmed booking, with no amendment pending — after pickup, cancelling needs an operations review. `idempotencyKey` is required and a retry with the same key and reason returns the original attempt rather than requesting a second. A new request starts at `cancellationState: REQUESTED`. Read the shipment for subsequent progress and confirmation.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["reason","idempotencyKey"],"properties":{"reason":{"type":"string","minLength":3,"maxLength":2000},"idempotencyKey":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Requested","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shipment"}}}},"409":{"description":"Not cancellable in its current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/amendments":{"get":{"summary":"List amendments proposed on your shipments","parameters":[{"name":"pageSize","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"shipmentId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"state","in":"query","schema":{"type":"string"}}],"description":"An amendment in `CUSTOMER_APPROVAL_REQUIRED` is waiting for you.","responses":{"200":{"description":"Amendments","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Amendment"}}}}}}}}}},"/amendments/{id}":{"get":{"summary":"Read one amendment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Amendment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Amendment"}}}}}}},"/amendments/{id}/accept":{"post":{"summary":"Accept a proposed amendment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"description":"Amendments are proposed by our operations team; your half is consent. `acceptedSellCents` must equal the proposed price exactly — accepting a price you did not read is refused rather than silently applied. Accepting one already submitted returns it unchanged, so a retry is safe.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["acceptedSellCents","accepted"],"properties":{"acceptedSellCents":{"type":"integer"},"accepted":{"type":"boolean","enum":[true]}}}}}},"responses":{"200":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Amendment"}}}},"409":{"description":"The price did not match, or it is no longer available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/claims":{"get":{"summary":"List your claims","parameters":[{"name":"pageSize","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"The opaque nextCursor from the previous page. Keep the filters the same."}],"responses":{"200":{"description":"Claims with a snapshot cursor","content":{"application/json":{"schema":{"type":"object"}}}}}},"post":{"summary":"Open a claim on a confirmed shipment","description":"Records a claim in the portal. **This does not file a claim with a carrier or insurer** — it opens the intake our team works from, and the response says so. `idempotencyKey` is required; a retry returns the original claim. Deciding a claim is an operations action and is not part of this API.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["idempotencyKey","shipmentId","type","amountCents","description","incidentDate"],"properties":{"idempotencyKey":{"type":"string","format":"uuid"},"shipmentId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["LOSS","DAMAGE","SHORTAGE"]},"amountCents":{"type":"integer"},"description":{"type":"string"},"incidentDate":{"type":"string","format":"date"}}}}}},"responses":{"201":{"description":"Opened","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Claim"}}}},"409":{"description":"The shipment is not in a state a claim can be opened against","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/claims/{id}":{"get":{"summary":"Read one claim and its decisions","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Claim","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Claim"}}}}}}},"/invoices":{"get":{"summary":"List invoices with balances","parameters":[{"name":"pageSize","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}}],"responses":{"200":{"description":"Invoices","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}}}}}}}}}},"/invoices/{id}":{"get":{"summary":"Read one invoice","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Invoice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}}}}},"/webhooks":{"get":{"summary":"List your webhook endpoints and the event types available","responses":{"200":{"description":"Endpoints","content":{"application/json":{"schema":{"type":"object"}}}}}},"post":{"summary":"Register a webhook endpoint","description":"https only, on a publicly reachable host. The signing secret is returned once and never again. Omit `eventTypes` to receive every event, including ones added later.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"},"description":{"type":"string"},"eventTypes":{"type":"array","items":{"type":"string","enum":["claim.opened","claim.updated","invoice.issued","quote.manual_offer_ready","shipment.amendment_proposed","shipment.booked","shipment.booking_failed","shipment.booking_unconfirmed","shipment.cancellation_pending","shipment.document_available","shipment.issue_reported","shipment.status_changed"]}}}}}}},"responses":{"201":{"description":"Registered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"description":"The endpoint was refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}":{"delete":{"summary":"Delete a webhook endpoint","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/webhooks/deliveries":{"get":{"summary":"Read webhook delivery outcomes","parameters":[{"name":"pageSize","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}],"responses":{"200":{"description":"Deliveries","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/webhooks/deliveries/{id}/replay":{"post":{"summary":"Send one delivery again","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"description":"Re-queues the same delivery, so the event keeps its id and your deduplication still works. Only a delivery that has settled; one still being attempted is refused rather than duplicated.","responses":{"200":{"description":"Queued","content":{"application/json":{"schema":{"type":"object"}}}},"409":{"description":"Still in flight, or the endpoint is disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}