> For the complete documentation index, see [llms.txt](https://docs.aquanow.io/cams/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aquanow.io/cams/api-reference/accounts/credit.md).

# Credit

{% openapi src="/files/wPwNFVndtoV6bXbiYGpH" path="/v1/accounts/{accountId}/credit-limit/history" method="get" %}
[older\_DO\_NOT\_DELETE.json](https://2600433319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4LnbO9QFRq3XZT6kRr2v%2Fuploads%2F64M6x1VXbs1sOP6KUSF5%2Fv1.0.json?alt=media\&token=8ecc6a0c-73a5-45b4-b1ce-6f288d55c1bd)
{% endopenapi %}

## Set the credit limit of an account

> Set the credit limit of an account to the amount specified

```json
{"openapi":"3.0.3","info":{"title":"Aquanow CAMS REST API","version":"1.0"},"servers":[{"url":"https://cams.aquanow.com/api","description":"production"},{"url":"http://localhost:3001/api","description":"local"},{"url":"https://cams.dev.aquanow.com/api","description":"dev"},{"url":"https://cams.staging.aquanow.com/api","description":"staging"},{"url":"https://cams.cert.aquanow.com/api","description":"cert"},{"url":"https://marketdata.aquanow.com","description":"production market data"},{"url":"https://marketdata.staging.aquanow.com","description":"staging market data"},{"url":"https://marketdata.dev.aquanow.com","description":"dev market data"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","scheme":"bearer"}},"parameters":{"X-Request-Id-CreditAdjustment":{"name":"X-Request-Id","in":"header","required":false,"schema":{"type":"string"},"description":"A unique 'Reference Number' for each incoming credit adjustment request. Any retries will retain the same x-request-Id value."}},"headers":{"X-Request-Id":{"description":"Unique identifier for this request. If the client supplied X-Request-Id, the same value is returned.","schema":{"type":"string"}}},"responses":{"400":{"description":"Validation Error"},"401":{"description":"Unauthorized"},"403":{"description":"Insufficient Privileges"},"409":{"description":"Duplicate request error","content":{"application/json":{"schema":{"properties":{"id":{"type":"string"}}}}}},"4XX":{"description":"Client error"},"5XX":{"description":"Server error"}}},"paths":{"/v1/accounts/{accountId}/credit-limit":{"put":{"summary":"Set the credit limit of an account","description":"Set the credit limit of an account to the amount specified","tags":["Accounts"],"parameters":[{"$ref":"#/components/parameters/X-Request-Id-CreditAdjustment"},{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The account ID"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["amount"],"properties":{"amount":{"type":"string","format":"number"}}}}}},"responses":{"200":{"description":"Successful response","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid"},"newCreditLimit":{"type":"string","format":"number"}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"409":{"$ref":"#/components/responses/409"},"4XX":{"$ref":"#/components/responses/4XX"},"5XX":{"$ref":"#/components/responses/5XX"}},"operationId":"SetCreditLimit"}}}}
```

## Increase or Decrease Credit Limit

> Applies an incremental change to the credit limit of an account

```json
{"openapi":"3.0.3","info":{"title":"Aquanow CAMS REST API","version":"1.0"},"servers":[{"url":"https://cams.aquanow.com/api","description":"production"},{"url":"http://localhost:3001/api","description":"local"},{"url":"https://cams.dev.aquanow.com/api","description":"dev"},{"url":"https://cams.staging.aquanow.com/api","description":"staging"},{"url":"https://cams.cert.aquanow.com/api","description":"cert"},{"url":"https://marketdata.aquanow.com","description":"production market data"},{"url":"https://marketdata.staging.aquanow.com","description":"staging market data"},{"url":"https://marketdata.dev.aquanow.com","description":"dev market data"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","scheme":"bearer"}},"parameters":{"X-Request-Id-CreditAdjustment":{"name":"X-Request-Id","in":"header","required":false,"schema":{"type":"string"},"description":"A unique 'Reference Number' for each incoming credit adjustment request. Any retries will retain the same x-request-Id value."}},"headers":{"X-Request-Id":{"description":"Unique identifier for this request. If the client supplied X-Request-Id, the same value is returned.","schema":{"type":"string"}}},"responses":{"400":{"description":"Validation Error"},"401":{"description":"Unauthorized"},"403":{"description":"Insufficient Privileges"},"409":{"description":"Duplicate request error","content":{"application/json":{"schema":{"properties":{"id":{"type":"string"}}}}}},"4XX":{"description":"Client error"},"5XX":{"description":"Server error"}}},"paths":{"/v1/accounts/{accountId}/credit-limit":{"patch":{"summary":"Increase or Decrease Credit Limit","description":"Applies an incremental change to the credit limit of an account","tags":["Accounts"],"parameters":[{"$ref":"#/components/parameters/X-Request-Id-CreditAdjustment"},{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The account ID"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["amount","action"],"properties":{"amount":{"type":"string","format":"number","description":"The amount to increase or decrease the credit limit by"},"action":{"type":"string","description":"The action to either increase or decrease the credit limit by the amount provided.","enum":["INCREASE","DECREASE"]}}}}}},"responses":{"200":{"description":"Successful response","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid"},"newCreditLimit":{"type":"string","format":"number"}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"409":{"$ref":"#/components/responses/409"},"4XX":{"$ref":"#/components/responses/4XX"},"5XX":{"$ref":"#/components/responses/5XX"}},"operationId":"AdjustCreditLimit"}}}}
```
