{"openapi":"3.1.0","info":{"title":"Gave integrator API","version":"0.0.0"},"paths":{"/health":{"get":{"tags":["system"],"operationId":"health","parameters":[],"security":[],"responses":{"204":{"description":"<No Content>"}}}},"/v1/spend-events":{"post":{"tags":["Spend events"],"operationId":"spendEvents.submit","parameters":[],"security":[{"apiKey":[]}],"responses":{"202":{"description":"gave/api/SpendEventAccepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gave_api_SpendEventAcceptedEncoded"}}}},"400":{"description":"InvalidRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"IntegratorMismatch | IntegratorSuspended","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IntegratorMismatchEncoded"},{"$ref":"#/components/schemas/IntegratorSuspendedEncoded"}]}}}},"409":{"description":"SpendEventConflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendEventConflictEncoded"}}}},"422":{"description":"EventInFuture | UserNotEnrolled","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EventInFutureEncoded"},{"$ref":"#/components/schemas/UserNotEnrolledEncoded"}]}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedEncoded"}}}},"503":{"description":"Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["authorization"]},"integratorId":{"type":"string","minLength":1,"maxLength":128},"userId":{"type":"string","minLength":1,"maxLength":128},"externalTransactionId":{"type":"string","minLength":1,"maxLength":128},"amount":{"type":"object","properties":{"currency":{"type":"string"},"amount":{"type":"string","maxLength":18}},"required":["currency","amount"],"additionalProperties":false},"merchant":{"type":"object","properties":{"descriptor":{"type":"string","minLength":1,"maxLength":200},"mcc":{"type":"string"},"mid":{"type":"string","minLength":1,"maxLength":64},"country":{"type":"string"}},"required":["descriptor","mcc"],"additionalProperties":false},"occurredAt":{"type":"string"}},"required":["kind","integratorId","userId","externalTransactionId","amount","merchant","occurredAt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["incremental_authorization"]},"integratorId":{"type":"string","minLength":1,"maxLength":128},"userId":{"type":"string","minLength":1,"maxLength":128},"externalTransactionId":{"type":"string","minLength":1,"maxLength":128},"amount":{"type":"object","properties":{"currency":{"type":"string"},"amount":{"type":"string","maxLength":18}},"required":["currency","amount"],"additionalProperties":false},"merchant":{"type":"object","properties":{"descriptor":{"type":"string","minLength":1,"maxLength":200},"mcc":{"type":"string"},"mid":{"type":"string","minLength":1,"maxLength":64},"country":{"type":"string"}},"required":["descriptor","mcc"],"additionalProperties":false},"occurredAt":{"type":"string"},"authorizationId":{"type":"string","minLength":1,"maxLength":128}},"required":["kind","integratorId","userId","externalTransactionId","amount","merchant","occurredAt","authorizationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["clearing"]},"integratorId":{"type":"string","minLength":1,"maxLength":128},"userId":{"type":"string","minLength":1,"maxLength":128},"externalTransactionId":{"type":"string","minLength":1,"maxLength":128},"amount":{"type":"object","properties":{"currency":{"type":"string"},"amount":{"type":"string","maxLength":18}},"required":["currency","amount"],"additionalProperties":false},"merchant":{"type":"object","properties":{"descriptor":{"type":"string","minLength":1,"maxLength":200},"mcc":{"type":"string"},"mid":{"type":"string","minLength":1,"maxLength":64},"country":{"type":"string"}},"required":["descriptor","mcc"],"additionalProperties":false},"occurredAt":{"type":"string"},"authorizationId":{"type":"string","minLength":1,"maxLength":128}},"required":["kind","integratorId","userId","externalTransactionId","amount","merchant","occurredAt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["reversal"]},"integratorId":{"type":"string","minLength":1,"maxLength":128},"userId":{"type":"string","minLength":1,"maxLength":128},"externalTransactionId":{"type":"string","minLength":1,"maxLength":128},"amount":{"type":"object","properties":{"currency":{"type":"string"},"amount":{"type":"string","maxLength":18}},"required":["currency","amount"],"additionalProperties":false},"merchant":{"type":"object","properties":{"descriptor":{"type":"string","minLength":1,"maxLength":200},"mcc":{"type":"string"},"mid":{"type":"string","minLength":1,"maxLength":64},"country":{"type":"string"}},"required":["descriptor","mcc"],"additionalProperties":false},"occurredAt":{"type":"string"},"authorizationId":{"type":"string","minLength":1,"maxLength":128}},"required":["kind","integratorId","userId","externalTransactionId","amount","merchant","occurredAt","authorizationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["refund"]},"integratorId":{"type":"string","minLength":1,"maxLength":128},"userId":{"type":"string","minLength":1,"maxLength":128},"externalTransactionId":{"type":"string","minLength":1,"maxLength":128},"amount":{"type":"object","properties":{"currency":{"type":"string"},"amount":{"type":"string","maxLength":18}},"required":["currency","amount"],"additionalProperties":false},"merchant":{"type":"object","properties":{"descriptor":{"type":"string","minLength":1,"maxLength":200},"mcc":{"type":"string"},"mid":{"type":"string","minLength":1,"maxLength":64},"country":{"type":"string"}},"required":["descriptor","mcc"],"additionalProperties":false},"occurredAt":{"type":"string"},"originalTransactionId":{"type":"string","minLength":1,"maxLength":128}},"required":["kind","integratorId","userId","externalTransactionId","amount","merchant","occurredAt","originalTransactionId"],"additionalProperties":false}]}}},"required":true}}},"/v1/users/{userId}/balance":{"get":{"tags":["Users"],"operationId":"users.balance","parameters":[{"name":"userId","in":"path","schema":{"type":"string","minLength":1,"maxLength":128},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"gave/api/UserBalance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gave_api_UserBalanceEncoded"}}}},"400":{"description":"InvalidRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"IntegratorSuspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegratorSuspendedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedEncoded"}}}},"503":{"description":"Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnavailableEncoded"}}}}}}},"/v1/api-keys":{"get":{"tags":["API keys"],"operationId":"apiKeys.list","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"gave/api/ApiKeyList","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gave_api_ApiKeyListEncoded"}}}},"400":{"description":"InvalidRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"IntegratorSuspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegratorSuspendedEncoded"}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedEncoded"}}}},"503":{"description":"Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnavailableEncoded"}}}}}},"post":{"tags":["API keys"],"operationId":"apiKeys.create","parameters":[],"security":[{"apiKey":[]}],"responses":{"201":{"description":"gave/api/ApiKeyCreated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gave_api_ApiKeyCreatedEncoded"}}}},"400":{"description":"InvalidRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"IntegratorSuspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegratorSuspendedEncoded"}}}},"422":{"description":"ApiKeyLimit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyLimitEncoded"}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedEncoded"}}}},"503":{"description":"Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}}},"required":true}}},"/v1/api-keys/{name}":{"delete":{"tags":["API keys"],"operationId":"apiKeys.revoke","parameters":[{"name":"name","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"gave/api/ApiKeyRevoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gave_api_ApiKeyRevokedEncoded"}}}},"400":{"description":"InvalidRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"IntegratorSuspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegratorSuspendedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"422":{"description":"LastActiveKey","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LastActiveKeyEncoded"}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedEncoded"}}}},"503":{"description":"Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnavailableEncoded"}}}}}}},"/v1/webhook-endpoints":{"get":{"tags":["Webhook endpoints"],"operationId":"webhookEndpoints.list","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"gave/api/WebhookEndpointList","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gave_api_WebhookEndpointListEncoded"}}}},"400":{"description":"InvalidRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"IntegratorSuspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegratorSuspendedEncoded"}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedEncoded"}}}},"503":{"description":"Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnavailableEncoded"}}}}}},"post":{"tags":["Webhook endpoints"],"operationId":"webhookEndpoints.create","parameters":[],"security":[{"apiKey":[]}],"responses":{"201":{"description":"gave/api/WebhookEndpointCreated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gave_api_WebhookEndpointCreatedEncoded"}}}},"400":{"description":"InvalidRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"IntegratorSuspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegratorSuspendedEncoded"}}}},"409":{"description":"WebhookEndpointConflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointConflictEncoded"}}}},"422":{"description":"WebhookEndpointLimit | EndpointUrlRefused","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WebhookEndpointLimitEncoded"},{"$ref":"#/components/schemas/EndpointUrlRefusedEncoded"}]}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedEncoded"}}}},"503":{"description":"Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","maxLength":2048}},"required":["id","url"],"additionalProperties":false}}},"required":true}}},"/v1/webhook-endpoints/{id}":{"get":{"tags":["Webhook endpoints"],"operationId":"webhookEndpoints.get","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"gave/api/WebhookEndpointResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gave_api_WebhookEndpointResponseEncoded"}}}},"400":{"description":"InvalidRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"IntegratorSuspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegratorSuspendedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedEncoded"}}}},"503":{"description":"Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnavailableEncoded"}}}}}},"patch":{"tags":["Webhook endpoints"],"operationId":"webhookEndpoints.update","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"gave/api/WebhookEndpointResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gave_api_WebhookEndpointResponseEncoded"}}}},"400":{"description":"InvalidRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"IntegratorSuspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegratorSuspendedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"422":{"description":"EndpointUrlRefused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointUrlRefusedEncoded"}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedEncoded"}}}},"503":{"description":"Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048}},"required":["url"],"additionalProperties":false}}},"required":true}},"delete":{"tags":["Webhook endpoints"],"operationId":"webhookEndpoints.delete","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"gave/api/WebhookEndpointResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gave_api_WebhookEndpointResponseEncoded"}}}},"400":{"description":"InvalidRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"IntegratorSuspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegratorSuspendedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedEncoded"}}}},"503":{"description":"Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnavailableEncoded"}}}}}}},"/v1/webhook-endpoints/{id}/rotate-secret":{"post":{"tags":["Webhook endpoints"],"operationId":"webhookEndpoints.rotateSecret","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"gave/api/WebhookSecretRotated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gave_api_WebhookSecretRotatedEncoded"}}}},"400":{"description":"InvalidRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"IntegratorSuspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegratorSuspendedEncoded"}}}},"404":{"description":"NotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundEncoded"}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedEncoded"}}}},"503":{"description":"Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnavailableEncoded"}}}}}}},"/v1/sandbox/vault":{"get":{"tags":["Sandbox"],"operationId":"sandbox.vault","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"gave/api/SandboxVault","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gave_api_SandboxVaultEncoded"}}}},"400":{"description":"InvalidRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"IntegratorSuspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegratorSuspendedEncoded"}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedEncoded"}}}},"503":{"description":"Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnavailableEncoded"}}}}}}},"/v1/sandbox/deposits":{"post":{"tags":["Sandbox"],"operationId":"sandbox.deposit","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"gave/api/SimulationRecorded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gave_api_SimulationRecordedEncoded"}}}},"400":{"description":"InvalidRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"IntegratorSuspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegratorSuspendedEncoded"}}}},"409":{"description":"SimulationConflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulationConflictEncoded"}}}},"422":{"description":"SimulationRefused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulationRefusedEncoded"}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedEncoded"}}}},"503":{"description":"Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":128},"amount":{"type":"object","properties":{"asset":{"type":"string","enum":["USDC","EURe"]},"amount":{"type":"string","maxLength":78}},"required":["asset","amount"],"additionalProperties":false}},"required":["reference","amount"],"additionalProperties":false}}},"required":true}}},"/v1/sandbox/withdrawals":{"post":{"tags":["Sandbox"],"operationId":"sandbox.withdraw","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"gave/api/SimulationRecorded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gave_api_SimulationRecordedEncoded"}}}},"400":{"description":"InvalidRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"IntegratorSuspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegratorSuspendedEncoded"}}}},"409":{"description":"SimulationConflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulationConflictEncoded"}}}},"422":{"description":"SimulationRefused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulationRefusedEncoded"}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedEncoded"}}}},"503":{"description":"Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":128},"amount":{"type":"object","properties":{"asset":{"type":"string","enum":["USDC","EURe"]},"amount":{"type":"string","maxLength":78}},"required":["asset","amount"],"additionalProperties":false}},"required":["reference","amount"],"additionalProperties":false}}},"required":true}}},"/v1/sandbox/claims":{"post":{"tags":["Sandbox"],"operationId":"sandbox.claim","parameters":[],"security":[{"apiKey":[]}],"responses":{"202":{"description":"gave/api/SimulationRecorded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/gave_api_SimulationRecordedEncoded"}}}},"400":{"description":"InvalidRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedEncoded"}}}},"403":{"description":"IntegratorSuspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegratorSuspendedEncoded"}}}},"409":{"description":"SimulationConflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulationConflictEncoded"}}}},"422":{"description":"SimulationRefused | UserNotEnrolled","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SimulationRefusedEncoded"},{"$ref":"#/components/schemas/UserNotEnrolledEncoded"}]}}}},"429":{"description":"RateLimited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedEncoded"}}}},"503":{"description":"Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnavailableEncoded"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":128},"userId":{"type":"string","minLength":1,"maxLength":128},"amount":{"type":"object","properties":{"asset":{"type":"string","enum":["USDC","EURe"]},"amount":{"type":"string","maxLength":78}},"required":["asset","amount"],"additionalProperties":false}},"required":["reference","userId","amount"],"additionalProperties":false}}},"required":true}}}},"components":{"schemas":{"RateLimitedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["RateLimited"]},"retryAfterSeconds":{"type":"integer"},"message":{"type":"string"}},"required":["_tag","retryAfterSeconds","message"],"additionalProperties":false},"IntegratorSuspendedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["IntegratorSuspended"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"UnauthorizedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["Unauthorized"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"InvalidRequestEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["InvalidRequest"]},"part":{"type":"string"},"message":{"type":"string"}},"required":["_tag","part","message"],"additionalProperties":false},"UnavailableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["Unavailable"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"UserNotEnrolledEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["UserNotEnrolled"]},"userId":{"type":"string","minLength":1,"maxLength":128},"message":{"type":"string"}},"required":["_tag","userId","message"],"additionalProperties":false},"SimulationRefusedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["SimulationRefused"]},"reference":{"type":"string","minLength":1,"maxLength":128},"message":{"type":"string"}},"required":["_tag","reference","message"],"additionalProperties":false},"SimulationConflictEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["SimulationConflict"]},"reference":{"type":"string","minLength":1,"maxLength":128},"message":{"type":"string"}},"required":["_tag","reference","message"],"additionalProperties":false},"gave_api_SimulationRecordedEncoded":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":128},"vaultId":{"type":"string","minLength":1,"maxLength":128},"duplicate":{"type":"boolean"}},"required":["reference","vaultId","duplicate"],"additionalProperties":false},"gave_api_SandboxVaultEncoded":{"type":"object","properties":{"vaultId":{"type":"string","minLength":1,"maxLength":128},"balances":{"type":"array","items":{"type":"object","properties":{"asset":{"type":"string","enum":["USDC","EURe"]},"held":{"type":"string","maxLength":78},"free":{"type":"string","maxLength":78}},"required":["asset","held","free"],"additionalProperties":false}}},"required":["vaultId","balances"],"additionalProperties":false},"NotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["NotFound"]},"resource":{"type":"string","enum":["user","api_key","webhook_endpoint","program"]},"id":{"type":"string"},"message":{"type":"string"}},"required":["_tag","resource","id","message"],"additionalProperties":false},"gave_api_WebhookEndpointResponseEncoded":{"type":"object","properties":{"endpoint":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","maxLength":2048},"createdAt":{"type":"string"},"previousSecretExpiresAt":{"type":"string"}},"required":["id","url","createdAt"],"additionalProperties":false}},"required":["endpoint"],"additionalProperties":false},"gave_api_WebhookSecretRotatedEncoded":{"type":"object","properties":{"endpoint":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","maxLength":2048},"createdAt":{"type":"string"},"previousSecretExpiresAt":{"type":"string"}},"required":["id","url","createdAt"],"additionalProperties":false},"secret":{"type":"string"}},"required":["endpoint","secret"],"additionalProperties":false},"EndpointUrlRefusedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["EndpointUrlRefused"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"WebhookEndpointLimitEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["WebhookEndpointLimit"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"WebhookEndpointConflictEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["WebhookEndpointConflict"]},"id":{"type":"string"},"message":{"type":"string"}},"required":["_tag","id","message"],"additionalProperties":false},"gave_api_WebhookEndpointCreatedEncoded":{"type":"object","properties":{"endpoint":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","maxLength":2048},"createdAt":{"type":"string"},"previousSecretExpiresAt":{"type":"string"}},"required":["id","url","createdAt"],"additionalProperties":false},"secret":{"type":"string"},"duplicate":{"type":"boolean"}},"required":["endpoint","duplicate"],"additionalProperties":false},"gave_api_WebhookEndpointListEncoded":{"type":"object","properties":{"endpoints":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","maxLength":2048},"createdAt":{"type":"string"},"previousSecretExpiresAt":{"type":"string"}},"required":["id","url","createdAt"],"additionalProperties":false}}},"required":["endpoints"],"additionalProperties":false},"LastActiveKeyEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["LastActiveKey"]},"name":{"type":"string"},"message":{"type":"string"}},"required":["_tag","name","message"],"additionalProperties":false},"gave_api_ApiKeyRevokedEncoded":{"type":"object","properties":{"key":{"type":"object","properties":{"name":{"type":"string"},"last4":{"type":"string"},"createdAt":{"type":"string"},"revokedAt":{"type":"string"}},"required":["name","last4","createdAt"],"additionalProperties":false}},"required":["key"],"additionalProperties":false},"ApiKeyLimitEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ApiKeyLimit"]},"limit":{"type":"integer"},"message":{"type":"string"}},"required":["_tag","limit","message"],"additionalProperties":false},"gave_api_ApiKeyCreatedEncoded":{"type":"object","properties":{"key":{"type":"object","properties":{"name":{"type":"string"},"last4":{"type":"string"},"createdAt":{"type":"string"},"revokedAt":{"type":"string"}},"required":["name","last4","createdAt"],"additionalProperties":false},"secret":{"type":"string"},"duplicate":{"type":"boolean"}},"required":["key","duplicate"],"additionalProperties":false},"gave_api_ApiKeyListEncoded":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"last4":{"type":"string"},"createdAt":{"type":"string"},"revokedAt":{"type":"string"}},"required":["name","last4","createdAt"],"additionalProperties":false}}},"required":["keys"],"additionalProperties":false},"gave_api_UserBalanceEncoded":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":128},"balances":{"type":"array","items":{"type":"object","properties":{"asset":{"type":"string","enum":["USDC","EURe"]},"expected":{"type":"string","maxLength":78},"pending":{"type":"string","maxLength":78},"claimable":{"type":"string","maxLength":78},"paid":{"type":"string","maxLength":78},"owed":{"type":"string","maxLength":78}},"required":["asset","expected","pending","claimable","paid","owed"],"additionalProperties":false}}},"required":["userId","balances"],"additionalProperties":false},"EventInFutureEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["EventInFuture"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"SpendEventConflictEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["SpendEventConflict"]},"id":{"type":"string"},"message":{"type":"string"}},"required":["_tag","id","message"],"additionalProperties":false},"IntegratorMismatchEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["IntegratorMismatch"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"gave_api_SpendEventAcceptedEncoded":{"type":"object","properties":{"id":{"type":"string"},"duplicate":{"type":"boolean"}},"required":["id","duplicate"],"additionalProperties":false}},"securitySchemes":{"apiKey":{"type":"apiKey","name":"x-api-key","in":"header"}}},"security":[],"tags":[{"name":"system"},{"name":"Spend events","description":"Card transactions sent by integrators. Stored once, processed after the response (spec 11)."},{"name":"Users","description":"Users the integrator enrolls, and their rewards."},{"name":"API keys","description":"The integrator's keys. A secret is shown once, when its key is created; rotate by creating a key, then revoking the old one."},{"name":"Webhook endpoints","description":"Where the integrator's events go, signed with a secret shown once (spec 10). One endpoint per integrator for now."},{"name":"Sandbox","description":"A simulated chain for the sandbox vault: deposits, withdrawals and claims. Not in production."}]}