{"openapi":"3.1.0","info":{"title":"Pace assistant connector","version":"1.0.0","summary":"Read a Pace subscriber's weekly number, bills, and recent spending, and log a purchase.","description":"Every request carries a personal key the subscriber generated inside the Pace iPhone app (Account, then Connected assistants) as `Authorization: Bearer pace_live_...`. The subscriber can revoke the key at any time. Pace never holds or moves money, and the connector cannot either: no payments, no transfers, no bank credentials, account numbers, per-account balances, or email in any response. United States, USD only.","termsOfService":"https://pace.money/developers","contact":{"name":"Pace","url":"https://pace.money/developers"}},"servers":[{"url":"https://api.pace.money/api/v1"}],"security":[{"paceKey":[]}],"paths":{"/me":{"get":{"operationId":"getMe","summary":"Who this key belongs to","description":"Confirms the key works and returns the subscriber's first name, timezone, and the key's own label. No email, no identifiers.","responses":{"200":{"description":"The key is valid and the subscription is active.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"description":"The key is missing, malformed, or revoked. Body: {\"error\":\"invalid_key\"}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The key belongs to an account without an active Pace Pro subscription. Body: {\"error\":\"subscription_required\",\"app_store_url\":\"...\"}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 60 requests in one minute for this key. Retry-After is set in seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/number":{"get":{"operationId":"getNumber","summary":"The weekly number","description":"What the subscriber can still spend this week, computed exactly as the app's home screen computes it. Weeks run Monday to Sunday in the subscriber's timezone.","responses":{"200":{"description":"This week's numbers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Number"}}}},"401":{"description":"The key is missing, malformed, or revoked. Body: {\"error\":\"invalid_key\"}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The key belongs to an account without an active Pace Pro subscription. Body: {\"error\":\"subscription_required\",\"app_store_url\":\"...\"}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The subscriber has not finished setting up a budget in the app yet. Body: {\"error\":\"starter_budget_missing\"}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 60 requests in one minute for this key. Retry-After is set in seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/bills":{"get":{"operationId":"getBills","summary":"Bills this month","description":"Recurring bills the app has forecast for the current month, with overdue, upcoming, and paid status. The window defaults to the rest of the month and cannot extend past it.","parameters":[{"name":"until","in":"query","required":false,"description":"Only bills due on or before this date (YYYY-MM-DD). Defaults to the last day of the current month.","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Bills in the window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bills"}}}},"400":{"description":"until is not a YYYY-MM-DD date.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The key is missing, malformed, or revoked. Body: {\"error\":\"invalid_key\"}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The key belongs to an account without an active Pace Pro subscription. Body: {\"error\":\"subscription_required\",\"app_store_url\":\"...\"}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The subscriber has not finished setting up a budget in the app yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 60 requests in one minute for this key. Retry-After is set in seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/spending":{"get":{"operationId":"getSpending","summary":"Recent spending","description":"Transactions from the last N days, newest first, at most 100 rows. Bank rows carry the cleaned merchant name only; nothing about the institution or account.","parameters":[{"name":"days","in":"query","required":false,"description":"How many days back, including today. Default 7, maximum 90.","schema":{"type":"integer","minimum":1,"maximum":90,"default":7}}],"responses":{"200":{"description":"Transactions in the window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Spending"}}}},"401":{"description":"The key is missing, malformed, or revoked. Body: {\"error\":\"invalid_key\"}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The key belongs to an account without an active Pace Pro subscription. Body: {\"error\":\"subscription_required\",\"app_store_url\":\"...\"}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 60 requests in one minute for this key. Retry-After is set in seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/purchases":{"post":{"operationId":"logPurchase","summary":"Log a purchase","description":"Records a purchase the subscriber made, exactly as if they had typed it into the app. The response includes the weekly number after the purchase so you can tell them what it did to their week. This is the only write in the connector and it never moves money. Every call needs an Idempotency-Key header; sending the same key again returns the original result with status 201 and logs nothing new, so a retried request is always safe.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"A value you choose that identifies this one purchase (1 to 128 characters, for example a UUID). Reuse it on retries. A different purchase needs a different key.","schema":{"type":"string","minLength":1,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseInput"}}}},"responses":{"201":{"description":"The purchase was recorded, or this Idempotency-Key was seen before and the original result is returned unchanged. The Idempotency-Replayed response header says which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseResult"}}}},"400":{"description":"Validation failed. error is one of idempotency_key_required, invalid_idempotency_key, invalid_amount, invalid_merchant, invalid_date, invalid_note.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The key is missing, malformed, or revoked. Body: {\"error\":\"invalid_key\"}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The key belongs to an account without an active Pace Pro subscription. Body: {\"error\":\"subscription_required\",\"app_store_url\":\"...\"}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The subscriber has not finished setting up a budget in the app yet, so there is no weekly number to log against. Nothing was recorded. Body: {\"error\":\"starter_budget_missing\"}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"More than 60 requests in one minute for this key. Retry-After is set in seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"paceKey":{"type":"http","scheme":"bearer","bearerFormat":"pace_live_ followed by 43 base64url characters","description":"A personal key the subscriber generated in the Pace app under Account, then Connected assistants."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"A stable machine-readable code."},"message":{"type":"string"},"app_store_url":{"type":"string","format":"uri","description":"Present on 402 only: where to subscribe."},"retry_after_seconds":{"type":"integer","description":"Present on 429 only."}}},"Me":{"type":"object","required":["timezone","currency","subscription","key"],"properties":{"first_name":{"type":"string"},"timezone":{"type":"string","description":"IANA timezone the subscriber's days and weeks are measured in."},"currency":{"type":"string","const":"USD"},"subscription":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["active"]}}},"key":{"type":"object","required":["prefix","name","created_at"],"properties":{"prefix":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}}}},"Number":{"type":"object","required":["left_this_week","weekly_number","spent_this_week","week_start","week_end","status","bills_reserved_this_month","savings_reserved_this_month","as_of"],"properties":{"left_this_week":{"type":"number","description":"Dollars the subscriber can still spend this week. Zero once the week is overspent."},"weekly_number":{"type":"number","description":"This week's spending limit in dollars, after bills and savings are reserved."},"spent_this_week":{"type":"number"},"week_start":{"type":"string","format":"date"},"week_end":{"type":"string","format":"date"},"status":{"type":"string","enum":["ahead","on_pace","behind","off_track"]},"bills_reserved_this_month":{"type":"number","description":"Dollars set aside for bills still due this month."},"savings_reserved_this_month":{"type":"number"},"as_of":{"type":"string","format":"date-time"}}},"Bill":{"type":"object","required":["name","amount","due_date","status"],"properties":{"name":{"type":"string"},"amount":{"type":"number"},"due_date":{"type":"string","format":"date"},"status":{"type":"string","enum":["upcoming","overdue","paid"]}}},"Bills":{"type":"object","required":["bills","total_upcoming","until"],"properties":{"bills":{"type":"array","items":{"$ref":"#/components/schemas/Bill"}},"total_upcoming":{"type":"number","description":"Dollars still to be paid in the window."},"until":{"type":"string","format":"date","description":"The window end actually applied."}}},"Transaction":{"type":"object","required":["id","date","merchant","amount","source","classification"],"properties":{"id":{"type":"string"},"date":{"type":"string","format":"date"},"merchant":{"type":"string"},"amount":{"type":"number","description":"Dollars. Negative values are refunds or credits."},"source":{"type":"string","enum":["bank","manual"]},"classification":{"type":["string","null"],"enum":["need","want",null]}}},"Spending":{"type":"object","required":["transactions","total","from","to"],"properties":{"transactions":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}},"total":{"type":"number","description":"Sum of the listed amounts."},"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"}}},"PurchaseInput":{"type":"object","required":["amount","merchant"],"properties":{"amount":{"type":"number","exclusiveMinimum":0,"description":"Dollars."},"merchant":{"type":"string","maxLength":120},"date":{"type":"string","format":"date","description":"Defaults to today in the subscriber's timezone. Cannot be later than that day."},"note":{"type":"string","maxLength":280}}},"PurchaseResult":{"type":"object","required":["transaction","number"],"properties":{"transaction":{"$ref":"#/components/schemas/Transaction"},"number":{"$ref":"#/components/schemas/Number"}}}}}}