{"openapi":"3.1.0","info":{"title":"GET /api/v1/credit/sandbox/partner-pulls","version":"1.0.0","description":"List registered pulls"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/credit/sandbox/partner-pulls":{"get":{"tags":["credit"],"summary":"List registered pulls","description":"Sandbox only. The business's pulls, newest first, each with its tables (item counts and roles), whether it is redacted, when it was scanned and when it expires. Expired pulls are removed when this is called.","operationId":"credit_list_partner_pulls","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Pulls per page (1-200).","default":50,"title":"Limit"},"description":"Pulls per page (1-200)."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`next_cursor` from the last page.","title":"Cursor"},"description":"`next_cursor` from the last page."},{"name":"include_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Also count every pull the business has registered.","default":false,"title":"Include Total Count"},"description":"Also count every pull the business has registered."},{"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_PartnerPullPage_"}}}},"400":{"description":"Bad Request - Invalid input","content":{"application/json":{"example":{"error":"validation_error","message":"Validation failed: due_date: Input should be a valid date","errors":{"due_date":"Input should be a valid date"},"code":"GEN_002","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Missing or expired token, an MCP OAuth token used against the REST API, or no access to this business","content":{"application/json":{"example":{"error":"unauthorized","message":"Authentication required","code":"AUTH_001","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"error":"forbidden","message":"You don't have permission to access this resource","code":"AUTH_002","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"validation_error","message":"Validation failed: amount: Input should be a valid integer","errors":{"amount":"Input should be a valid integer"},"code":"GEN_002","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"}}}}},"x-fastapi-operation-id":"credit_list_partner_pulls_api_v1_credit_sandbox_partner_pulls_get"}}},"components":{"schemas":{"PartnerPullPage":{"properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass back as `cursor` for the next page. Null on the last."},"has_next":{"type":"boolean","title":"Has Next","description":"Another page follows. Looked up one row past the page, so a full last page is not reported as more.","default":false},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit","description":"The page size the list was read with."},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total","description":"Row count; present only with `include_total_count=true`."},"items":{"items":{"$ref":"#/components/schemas/PartnerPullResponse"},"type":"array","title":"Items","description":"Pulls, newest first. Expired ones are gone."}},"type":"object","title":"PartnerPullPage"},"PartnerPullResponse":{"properties":{"id":{"type":"string","title":"Id","description":"The pull; send it as `pull_id` on the export."},"label":{"type":"string","title":"Label","description":"What the uploader called the pull."},"tables":{"items":{"$ref":"#/components/schemas/PartnerPullTable"},"type":"array","title":"Tables","description":"The files of the pull."},"redacted":{"type":"boolean","title":"Redacted","description":"True when the manifest says redaction was on and the files hold no email or phone number that looks real."},"salt_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Salt Id","description":"Names the redaction salt; never the salt."},"scanned_at":{"type":"string","format":"date-time","title":"Scanned At","description":"When the tables were scanned (UTC)."},"uploaded_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uploaded By User Id","description":"Who uploaded it, when a person did."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When it was registered (UTC)."},"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"When the files are removed: 30 days after registering (UTC)."},"roles_set":{"type":"boolean","title":"Roles Set","description":"True when a table is the transactions file, so it can be seeded."}},"type":"object","required":["id","label","tables","redacted","scanned_at","created_at","expires_at","roles_set"],"title":"PartnerPullResponse"},"PartnerPullTable":{"properties":{"table":{"type":"string","title":"Table","description":"The DynamoDB table the file was pulled from."},"file":{"type":"string","title":"File","description":"The NDJSON file's name."},"items":{"type":"integer","title":"Items","description":"How many items the file holds."},"sha256":{"type":"string","title":"Sha256","description":"The file's SHA-256, checked on upload."},"role":{"anyOf":[{"type":"string","enum":["transactions","merchants","payments"]},{"type":"null"}],"title":"Role","description":"What the table is to the seeder: `transactions`, `merchants` or `payments`. Null when it could not be worked out: say which is which with `roles` on the export."}},"type":"object","required":["table","file","items","sha256"],"title":"PartnerPullTable"},"SuccessEnvelope_PartnerPullPage_":{"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/PartnerPullPage"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[PartnerPullPage]"},"ErrorResponse":{"title":"ErrorResponse","type":"object","description":"Envelope returned by every non-2xx response. Branch on `code` (stable) rather than `message` (human-readable, may change).","required":["error","message","code"],"properties":{"error":{"type":"string","description":"Error category: `validation_error`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `rate_limited`, `server_error`, or `service_unavailable`."},"message":{"type":"string","description":"Human-readable explanation, safe to show to end users."},"code":{"type":"string","description":"Stable machine-readable code in `CATEGORY_NNN` form (e.g. `NOT_FOUND_006`, `AUTH_010`, `GEN_002`)."},"request_id":{"type":"string","description":"Correlation id for support requests. Echoes the `x-request-id` request header when one was supplied."},"errors":{"type":"object","additionalProperties":{"type":"string"},"description":"Field-level validation messages keyed by field name. Present on 400/422 validation failures only."}}}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}