{"openapi":"3.1.0","info":{"title":"POST /api/v1/payment-terms/seed-defaults","version":"1.0.0","description":"Seed default payment terms"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/payment-terms/seed-defaults":{"post":{"tags":["payment-terms"],"summary":"Seed default payment terms","description":"Seed default payment terms for the business (if none exist).","operationId":"seed_default_terms_api_v1_payment_terms_seed_defaults_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-business-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Business-Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentTermsListResponse"}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"example":{"detail":"Not authenticated"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"detail":"Not enough permissions"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"PaymentTermResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Payment term UUID"},"business_id":{"type":"string","title":"Business Id","description":"Business UUID"},"name":{"type":"string","title":"Name","description":"Display name"},"days_until_due":{"type":"integer","title":"Days Until Due","description":"Days until payment is due"},"discount_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Discount Percent","description":"Early payment discount percentage"},"discount_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Discount Days","description":"Days to receive discount"},"is_default":{"type":"boolean","title":"Is Default","description":"Is default payment term"},"is_active":{"type":"boolean","title":"Is Active","description":"Is active"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Last update timestamp"}},"type":"object","required":["id","business_id","name","days_until_due","is_default","is_active","created_at","updated_at"],"title":"PaymentTermResponse","description":"Response schema for a payment term."},"PaymentTermsListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PaymentTermResponse"},"type":"array","title":"Items","description":"List of items"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total","description":"Total number of items (null when not calculated for performance)"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit","description":"Pagination limit"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Cursor for next page"},"prev_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prev Cursor","description":"Cursor for previous page"},"has_next":{"type":"boolean","title":"Has Next","description":"Whether there are more items"},"has_prev":{"type":"boolean","title":"Has Prev","description":"Whether there are previous items"}},"type":"object","required":["items","has_next","has_prev"],"title":"PaymentTermsListResponse","description":"Paginated list of payment terms."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}