{"openapi":"3.1.0","info":{"title":"GET /api/v1/orders/{order_id}/esign","version":"1.0.0","description":"Get an order's e-signature status"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/orders/{order_id}/esign":{"get":{"tags":["orders-esign"],"summary":"Get an order's e-signature status","description":"Current envelope status for the order — refreshed live from the provider when credentials are configured, otherwise the stored snapshot. 400 when the order has no envelope.","operationId":"get_order_esign_status_api_v1_orders__order_id__esign_get","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order 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/SuccessEnvelope_ESignStatusResponse_"}}}},"400":{"description":"Bad Request - Invalid input","content":{"application/json":{"example":{"detail":"Invalid request parameters"}}}},"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":{"ESignStatusResponse":{"properties":{"order_id":{"type":"string","title":"Order Id"},"order_status":{"type":"string","title":"Order Status","description":"The order's own lifecycle status."},"provider":{"type":"string","title":"Provider","description":"E-signature provider, e.g. 'docusign'."},"envelope_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Envelope Id"},"esign_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Esign Status","description":"sent, delivered, completed, declined, or voided."},"esign_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Esign Sent At"},"refreshed":{"type":"boolean","title":"Refreshed","description":"True when this response reflects a live provider lookup rather than the stored status.","default":false}},"type":"object","required":["order_id","order_status","provider"],"title":"ESignStatusResponse","description":"Envelope-tracking state for an order."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"SuccessEnvelope_ESignStatusResponse_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"data":{"anyOf":[{"$ref":"#/components/schemas/ESignStatusResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[ESignStatusResponse]"},"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":[]}]}