{"openapi":"3.1.0","info":{"title":"GET /api/v1/delayed-charges/customers/{customer_id}/pending","version":"1.0.0","description":"Get customer pending charges"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/delayed-charges/customers/{customer_id}/pending":{"get":{"tags":["delayed-charges"],"summary":"Get customer pending charges","description":"Get pending delayed charges for a specific customer.","operationId":"get_customer_pending_charges_api_v1_delayed_charges_customers__customer_id__pending_get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"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":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerPendingChargesSummary"}}}},"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"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"detail":"Resource not found"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"CustomerPendingChargesSummary":{"properties":{"customer_id":{"type":"string","title":"Customer Id"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"total_charges":{"type":"integer","title":"Total Charges","description":"Total pending charges in cents","default":0},"total_credits":{"type":"integer","title":"Total Credits","description":"Total pending credits in cents","default":0},"net_amount":{"type":"integer","title":"Net Amount","description":"Net amount (charges - credits) in cents","default":0},"count":{"type":"integer","title":"Count","description":"Number of pending items","default":0},"items":{"items":{"$ref":"#/components/schemas/DelayedChargeResponse"},"type":"array","title":"Items"}},"type":"object","required":["customer_id"],"title":"CustomerPendingChargesSummary","description":"Summary of pending charges for a customer."},"DelayedChargeResponse":{"properties":{"id":{"type":"string","title":"Id"},"business_id":{"type":"string","title":"Business Id"},"customer_id":{"type":"string","title":"Customer Id"},"type":{"type":"string","title":"Type"},"status":{"type":"string","title":"Status"},"currency":{"type":"string","title":"Currency"},"amount":{"type":"integer","title":"Amount"},"amount_in_dollars":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount In Dollars"},"description":{"type":"string","title":"Description"},"internal_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Internal Notes"},"line_items":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Line Items"},"service_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Service Date"},"invoiced_invoice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoiced Invoice Id"},"invoiced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Invoiced At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"can_be_updated":{"type":"boolean","title":"Can Be Updated","default":false},"can_be_deleted":{"type":"boolean","title":"Can Be Deleted","default":false},"can_be_invoiced":{"type":"boolean","title":"Can Be Invoiced","default":false}},"type":"object","required":["id","business_id","customer_id","type","status","currency","amount","amount_in_dollars","description","created_at","updated_at"],"title":"DelayedChargeResponse","description":"Response schema for a delayed charge."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"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":[]}]}