# Account

## Create or Update an account

> Use this method to update impact.com when the status of an account changes or when a new account is created.\
> This call is only available on a classic program.<br>

```json
{"openapi":"3.1.0","info":{"title":"impact.com REST API - Account","version":"3.1.0"},"servers":[{"url":"https://app.referralsaasquatch.com/api/v1","description":"Production Server"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"http","scheme":"basic"}},"schemas":{"Account":{"required":["id","subscription"],"properties":{"id":{"type":"string","description":"Unique identifier for the account."},"subscription":{"$ref":"#/components/schemas/AccountSubscription"},"referral":{"$ref":"#/components/schemas/AccountReferral"},"currency":{"type":"string","description":"ISO 4217 standard currency code (e.g. `USD`, `EUR`)."}}},"AccountSubscription":{"required":["status"],"properties":{"status":{"type":"string","enum":["PAID","TRIAL","FREE","CANCELLED"]},"billingIntervalType":{"type":"string","enum":["DAY","WEEK","MONTH","QUARTER","SEMI_ANNUAL","YEAR"]},"billingIntervalValue":{"type":"integer"},"value":{"type":"number","format":"double"}}},"AccountReferral":{"properties":{"code":{"type":"string"}}},"Error":{"properties":{"statusCode":{"type":"integer","format":"int32","description":"The HTTP status code of the error."},"message":{"type":"string","description":"The human-readable description of what went wrong. Use this to help you debug."},"apiErrorCode":{"type":"string","description":"A machine-readable error code."},"rsCode":{"type":"string","nullable":true,"description":"A secondary machine-readable error code."}}}}},"paths":{"/{tenant_alias}/accountsync":{"post":{"deprecated":true,"summary":"Create or Update an account","operationId":"upsertAccount","tags":["Account"],"description":"Use this method to update impact.com when the status of an account changes or when a new account is created.\nThis call is only available on a classic program.\n","parameters":[{"name":"tenant_alias","in":"path","required":true,"schema":{"type":"string"},"description":"Tenant being referenced."}],"requestBody":{"description":"Account details to be created or updated.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"responses":{"200":{"description":"Account created or updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"403":{"description":"Endpoint is deprecated and not available on non-classic programs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Lookup an account

> Looks up an Account based upon \`id\` and returns the stored account information.\
> This call is only available on a classic program.<br>

```json
{"openapi":"3.1.0","info":{"title":"impact.com REST API - Account","version":"3.1.0"},"servers":[{"url":"https://app.referralsaasquatch.com/api/v1","description":"Production Server"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"http","scheme":"basic"}},"schemas":{"Account":{"required":["id","subscription"],"properties":{"id":{"type":"string","description":"Unique identifier for the account."},"subscription":{"$ref":"#/components/schemas/AccountSubscription"},"referral":{"$ref":"#/components/schemas/AccountReferral"},"currency":{"type":"string","description":"ISO 4217 standard currency code (e.g. `USD`, `EUR`)."}}},"AccountSubscription":{"required":["status"],"properties":{"status":{"type":"string","enum":["PAID","TRIAL","FREE","CANCELLED"]},"billingIntervalType":{"type":"string","enum":["DAY","WEEK","MONTH","QUARTER","SEMI_ANNUAL","YEAR"]},"billingIntervalValue":{"type":"integer"},"value":{"type":"number","format":"double"}}},"AccountReferral":{"properties":{"code":{"type":"string"}}},"Error":{"properties":{"statusCode":{"type":"integer","format":"int32","description":"The HTTP status code of the error."},"message":{"type":"string","description":"The human-readable description of what went wrong. Use this to help you debug."},"apiErrorCode":{"type":"string","description":"A machine-readable error code."},"rsCode":{"type":"string","nullable":true,"description":"A secondary machine-readable error code."}}}}},"paths":{"/{tenant_alias}/account/{accountId}":{"get":{"deprecated":true,"summary":"Lookup an account","operationId":"getAccount","tags":["Account"],"description":"Looks up an Account based upon `id` and returns the stored account information.\nThis call is only available on a classic program.\n","parameters":[{"name":"tenant_alias","in":"path","required":true,"schema":{"type":"string"},"description":"Tenant being referenced. E.g. `\"aboih12h16t\"` or `\"test_abo912126tastastt\"`"},{"name":"accountId","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` of the account to look up."}],"responses":{"200":{"description":"Account found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"403":{"description":"Endpoint is deprecated and not available on non-classic programs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Account NOT found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://integrations.impact.com/brand-api-reference/advocate-api-reference-v1/reference/account-overview/account.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
