Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: Account and Transactions Offers API
description: To retrieve account information for Barclays customers
termsOfService: https://www.openbanking.org.uk/terms
contact:
name: Service Desk
url: https://www.openbanking.org.uk
email: ServiceDesk@openbanking.org.uk
license:
name: open-licence
url: https://www.openbanking.org.uk/open-licence
version: v4.0
tags:
- name: Offers
description: Get Offers
paths:
/accounts/{accountId}/offers:
summary: Get Offers
description: Get Offers
get:
tags:
- Offers
summary: Get Offers for an AccountId
description: Enables an AISP to retrieve any offer information for a specific PSU account.
operationId: GetAccountsAccountIdOffers
parameters:
- $ref: '#/components/parameters/AccountId'
- $ref: '#/components/parameters/x-fapi-auth-date'
- $ref: '#/components/parameters/x-fapi-customer-ip-address'
- $ref: '#/components/parameters/x-fapi-interaction-id'
- $ref: '#/components/parameters/Authorization'
- $ref: '#/components/parameters/x-customer-user-agent'
responses:
'200':
$ref: '#/components/responses/200AccountsAccountIdOffersRead'
'400':
$ref: '#/components/responses/400Error'
'401':
$ref: '#/components/responses/401Error'
'500':
$ref: '#/components/responses/500Error'
'403':
$ref: '#/components/responses/403Error'
'404':
$ref: '#/components/responses/404Error'
'405':
$ref: '#/components/responses/405Error'
'406':
$ref: '#/components/responses/406Error'
'429':
$ref: '#/components/responses/429Error'
deprecated: false
/offers:
summary: Get Offers
description: Get Offers
get:
tags:
- Offers
summary: Get Offers
description: Enables an AISP to retrieve any offer information for account(s) that the PSU has consented to.
operationId: GetOffers
parameters:
- $ref: '#/components/parameters/x-fapi-auth-date'
- $ref: '#/components/parameters/x-fapi-customer-ip-address'
- $ref: '#/components/parameters/x-fapi-interaction-id'
- $ref: '#/components/parameters/Authorization'
- $ref: '#/components/parameters/x-customer-user-agent'
responses:
'500':
$ref: '#/components/responses/500Error'
'405':
$ref: '#/components/responses/405Error'
deprecated: false
components:
responses:
403Error:
description: Forbidden
headers:
x-fapi-interaction-id:
description: An RFC4122 UID used as a correlation id.
required: true
schema:
type: string
deprecated: false
maxLength: 36
minLength: 32
pattern: ^[A-Za-f0-9]{8}-?[A-Za-f0-9]{4}-?[1-5][A-Za-f0-9]{3}-?[89ab][A-Za-f0-9]{3}-?[A-Za-f0-9]{12}$
nullable: false
example: 93bac548-d2de-4546-b106-880a5018460d
Cache-Control:
description: GIS mandatory response header. This is added by the Cognac sidecar.
schema:
type: string
default: no-cache, no-store, must-revalidate
deprecated: false
maxLength: 35
minLength: 35
pattern: ^no-cache, no-store, must-revalidate$
nullable: false
example: no-cache, no-store, must-revalidate
content:
application/json:
schema:
$ref: '#/components/schemas/OBErrorResponse1'
examples:
403ErrorResponse:
value:
Code: OB.BadRequest
Id: 2b5f0fb2-730b-11e8-adc0-fa7ae01bbebc
Message: Invalid request parameters
Errors:
- ErrorCode: AC17
Message: Version must be supplied
Path: Data.Initiation
Url: <url to the api reference for Event Notification API>
- ErrorCode: AC17
Message: Version supplied is not valid
Path: Data.Initiation.CreditorAccount
Url: <url to the api reference for Event Notification API>
429Error:
description: Too Many Requests
headers:
Retry-After:
description: Number in seconds to wait
schema:
type: integer
deprecated: false
maximum: 9999999
minimum: 1
nullable: false
example: 120
x-fapi-interaction-id:
description: An RFC4122 UID used as a correlation id.
schema:
type: string
deprecated: false
maxLength: 36
minLength: 32
pattern: ^[A-Za-f0-9]{8}-?[A-Za-f0-9]{4}-?[1-5][A-Za-f0-9]{3}-?[89ab][A-Za-f0-9]{3}-?[A-Za-f0-9]{12}$
nullable: false
example: 93bac548-d2de-4546-b106-880a5018460d
Cache-Control:
description: GIS mandatory response header. This is added by the Cognac sidecar.
schema:
type: string
default: no-cache, no-store, must-revalidate
deprecated: false
maxLength: 35
minLength: 35
pattern: ^no-cache, no-store, must-revalidate$
nullable: false
example: no-cache, no-store, must-revalidate
400Error:
description: Bad request
headers:
x-fapi-interaction-id:
description: An RFC4122 UID used as a correlation id.
required: true
schema:
type: string
deprecated: false
maxLength: 36
minLength: 32
pattern: ^[A-Za-f0-9]{8}-?[A-Za-f0-9]{4}-?[1-5][A-Za-f0-9]{3}-?[89ab][A-Za-f0-9]{3}-?[A-Za-f0-9]{12}$
nullable: false
example: 93bac548-d2de-4546-b106-880a5018460d
Cache-Control:
description: GIS mandatory response header. This is added by the Cognac sidecar.
schema:
type: string
default: no-cache, no-store, must-revalidate
deprecated: false
maxLength: 35
minLength: 35
pattern: ^no-cache, no-store, must-revalidate$
nullable: false
example: no-cache, no-store, must-revalidate
content:
application/json:
schema:
$ref: '#/components/schemas/OBErrorResponse1'
examples:
400ErrorResponse:
value:
Code: OB.BadRequest
Id: 2b5f0fb2-730b-11e8-adc0-fa7ae01bbebc
Message: Invalid request parameters
Errors:
- ErrorCode: AC17
Message: Version must be supplied
Path: Data.Initiation
Url: <url to the api reference for Event Notification API>
- ErrorCode: AC17
Message: Version supplied is not valid
Path: Data.Initiation.CreditorAccount
Url: <url to the api reference for Event Notification API>
404Error:
description: Not found
headers:
x-fapi-interaction-id:
description: An RFC4122 UID used as a correlation id.
required: true
schema:
type: string
deprecated: false
maxLength: 36
minLength: 32
pattern: ^[A-Za-f0-9]{8}-?[A-Za-f0-9]{4}-?[1-5][A-Za-f0-9]{3}-?[89ab][A-Za-f0-9]{3}-?[A-Za-f0-9]{12}$
nullable: false
example: 93bac548-d2de-4546-b106-880a5018460d
Cache-Control:
description: GIS mandatory response header. This is added by the Cognac sidecar.
schema:
type: string
default: no-cache, no-store, must-revalidate
deprecated: false
maxLength: 35
minLength: 35
pattern: ^no-cache, no-store, must-revalidate$
nullable: false
example: no-cache, no-store, must-revalidate
500Error:
description: Internal Server Error
headers:
x-fapi-interaction-id:
description: An RFC4122 UID used as a correlation id.
required: true
schema:
type: string
deprecated: false
maxLength: 36
minLength: 32
pattern: ^[A-Za-f0-9]{8}-?[A-Za-f0-9]{4}-?[1-5][A-Za-f0-9]{3}-?[89ab][A-Za-f0-9]{3}-?[A-Za-f0-9]{12}$
nullable: false
example: 93bac548-d2de-4546-b106-880a5018460d
Cache-Control:
description: GIS mandatory response header. This is added by the Cognac sidecar.
schema:
type: string
default: no-cache, no-store, must-revalidate
deprecated: false
maxLength: 35
minLength: 35
pattern: ^no-cache, no-store, must-revalidate$
nullable: false
example: no-cache, no-store, must-revalidate
content:
application/json:
schema:
$ref: '#/components/schemas/OBErrorResponse1'
examples:
500ErrorResponse:
value:
Code: OB.BadRequest
Id: 2b5f0fb2-730b-11e8-adc0-fa7ae01bbebc
Message: Invalid request parameters
Errors:
- ErrorCode: AC17
Message: Version must be supplied
Path: Data.Initiation
Url: <url to the api reference for Event Notification API>
- ErrorCode: AC17
Message: Version supplied is not valid
Path: Data.Initiation.CreditorAccount
Url: <url to the api reference for Event Notification API>
405Error:
description: Method Not Allowed
headers:
x-fapi-interaction-id:
description: An RFC4122 UID used as a correlation id.
required: true
schema:
type: string
deprecated: false
maxLength: 36
minLength: 32
pattern: ^[A-Za-f0-9]{8}-?[A-Za-f0-9]{4}-?[1-5][A-Za-f0-9]{3}-?[89ab][A-Za-f0-9]{3}-?[A-Za-f0-9]{12}$
nullable: false
example: 93bac548-d2de-4546-b106-880a5018460d
Cache-Control:
description: GIS mandatory response header. This is added by the Cognac sidecar.
schema:
type: string
default: no-cache, no-store, must-revalidate
deprecated: false
maxLength: 35
minLength: 35
pattern: ^no-cache, no-store, must-revalidate$
nullable: false
example: no-cache, no-store, must-revalidate
401Error:
description: Unauthorized
headers:
x-fapi-interaction-id:
description: An RFC4122 UID used as a correlation id.
required: true
schema:
type: string
deprecated: false
maxLength: 36
minLength: 32
pattern: ^[A-Za-f0-9]{8}-?[A-Za-f0-9]{4}-?[1-5][A-Za-f0-9]{3}-?[89ab][A-Za-f0-9]{3}-?[A-Za-f0-9]{12}$
nullable: false
example: 93bac548-d2de-4546-b106-880a5018460d
Cache-Control:
description: GIS mandatory response header. This is added by the Cognac sidecar.
schema:
type: string
default: no-cache, no-store, must-revalidate
deprecated: false
maxLength: 35
minLength: 35
pattern: ^no-cache, no-store, must-revalidate$
nullable: false
example: no-cache, no-store, must-revalidate
200AccountsAccountIdOffersRead:
description: Offers Read
headers:
x-fapi-interaction-id:
description: An RFC4122 UID used as a correlation id.
required: true
schema:
type: string
deprecated: false
maxLength: 36
minLength: 32
pattern: ^[A-Za-f0-9]{8}-?[A-Za-f0-9]{4}-?[1-5][A-Za-f0-9]{3}-?[89ab][A-Za-f0-9]{3}-?[A-Za-f0-9]{12}$
nullable: false
example: 93bac548-d2de-4546-b106-880a5018460d
Cache-Control:
description: GIS mandatory response header. This is added by the Cognac sidecar.
schema:
type: string
default: no-cache, no-store, must-revalidate
deprecated: false
maxLength: 35
minLength: 35
pattern: ^no-cache, no-store, must-revalidate$
nullable: false
example: no-cache, no-store, must-revalidate
content:
application/json:
schema:
$ref: '#/components/schemas/OBReadOffer1'
examples:
get-offers-response:
value:
Data:
Offer:
- AccountId: '22289'
OfferId: Offer1
OfferType: LimitIncrease
Description: Credit limit increase for the account up to £10000.00
StartDateTime: '2024-05-29T00:00:00Z'
EndDateime: '2024-06-29T00:00:00Z'
Rate: '100.00'
Value: 10
Term: Starting first of the month and ending at the end of year
Fee:
Amount: '01.50'
Currency: GBP
URL: http://modelbank.com/offer/offer1
Amount:
Amount: '10000.00'
Currency: GBP
- AccountId: '22289'
OfferId: Offer2
OfferType: BalanceTransfer
StartDateTime: '2024-05-29T00:00:00Z'
EndDateTime: '2024-06-29T00:00:00Z'
Description: Balance transfer offer up to £2000
Amount:
Amount: '2000.00'
Currency: GBP
Links:
Self: https://api.alphabank.com/open-banking/v4.0/aisp/accounts/22289/offers/
Meta:
TotalPages: 1
406Error:
description: Not Acceptable
headers:
x-fapi-interaction-id:
description: An RFC4122 UID used as a correlation id.
required: true
schema:
type: string
deprecated: false
maxLength: 36
minLength: 32
pattern: ^[A-Za-f0-9]{8}-?[A-Za-f0-9]{4}-?[1-5][A-Za-f0-9]{3}-?[89ab][A-Za-f0-9]{3}-?[A-Za-f0-9]{12}$
nullable: false
example: 93bac548-d2de-4546-b106-880a5018460d
Cache-Control:
description: GIS mandatory response header. This is added by the Cognac sidecar.
schema:
type: string
default: no-cache, no-store, must-revalidate
deprecated: false
maxLength: 35
minLength: 35
pattern: ^no-cache, no-store, must-revalidate$
nullable: false
example: no-cache, no-store, must-revalidate
schemas:
OBActiveCurrencyAndAmount_SimpleType:
type: string
description: A number of monetary units specified in an active currency where the unit of currency is explicit and compliant with ISO 4217.
example: '1209.06'
pattern: ^\d{1,13}$|^\d{1,13}\.\d{1,5}$
ISODateTime:
type: string
format: date-time
description: "All dates in the JSON payloads are represented in ISO 8601 date-time format. \nAll date-time fields in responses must include the timezone. An example is below:\n2017-04-05T10:43:07+00:00"
OBError1:
type: object
additionalProperties: false
minProperties: 1
properties:
ErrorCode:
$ref: '#/components/schemas/OBExternalStatusReason1Code'
Message:
type: string
description: 'A description of the error that occurred. e.g., ''A mandatory field isn''t supplied'' or ''RequestedExecutionDateTime must be in future''
OBL doesn''t standardise this field'
maxLength: 500
minLength: 1
Path:
type: string
description: Recommended but optional reference to the JSON Path of the field with error, e.g., Data.Initiation.InstructedAmount.Currency
maxLength: 500
minLength: 1
Url:
type: string
description: URL to help remediate the problem, or provide more information, or to API Reference, or help etc
required:
- ErrorCode
ActiveOrHistoricCurrencyCode_1:
type: string
description: A code allocated to a currency by a Maintenance Agency under an international identification scheme, as described in the latest edition of the international standard ISO 4217 "Codes for the representation of currencies and funds".
example: GBP
pattern: ^[A-Z]{3,3}$
Meta:
type: object
additionalProperties: false
description: Meta Data relevant to the payload
properties:
TotalPages:
type: integer
format: int32
example: 42
maximum: 999999
minimum: 0
FirstAvailableDateTime:
$ref: '#/components/schemas/ISODateTime'
LastAvailableDateTime:
$ref: '#/components/schemas/ISODateTime'
title: MetaData
OBReadOffer1:
type: object
additionalProperties: false
deprecated: false
properties:
Data:
type: object
properties:
Offer:
type: array
items:
type: object
properties:
AccountId:
$ref: '#/components/schemas/AccountId'
OfferId:
type: string
description: A unique and immutable identifier used to identify the offer resource. This identifier has no meaning to the account owner.
example: Offer1
maxLength: 40
minLength: 1
OfferType:
type: string
description: Offer type, in a coded form. For a full list of values refer to `OBExternalOfferType1Code` in *OB_Internal_CodeSet* [here](https://github.com/OpenBankingUK/External_Internal_CodeSets)
enum:
- BalanceTransfer
- LimitIncrease
- MoneyTransfer
- Other
- PromotionalRate
example: LimitIncrease
Description:
type: string
description: Further details of the offer.
example: Credit limit increase for the account up to £10000.00
maxLength: 500
minLength: 1
StartDateTime:
type: string
format: date-time
description: "Date and time at which the offer starts. All dates in the JSON payloads are represented in ISO 8601 date-time format. \nAll date-time fields in responses must include the timezone. An example is below:\n2017-04-05T10:43:07+00:00"
example: '2024-05-29T00:00:00Z'
EndDateTime:
type: string
format: date-time
description: "Date and time at which the offer ends. All dates in the JSON payloads are represented in ISO 8601 date-time format. \nAll date-time fields in responses must include the timezone. An example is below:\n2017-04-05T10:43:07+00:00"
example: '2024-06-29T00:00:00Z'
Rate:
type: string
description: Rate associated with the offer type.
example: '100.00'
pattern: ^(-?\d{1,3}){1}(\.\d{1,4}){0,1}$
Value:
type: integer
description: Value associated with the offer type.
example: 10
maximum: 9999999
minimum: 0
Term:
type: string
description: Further details of the term of the offer.
example: Starting first of the month and ending at the end of year
maxLength: 500
minLength: 1
URL:
type: string
description: URL (Uniform Resource Locator) where documentation on the offer can be found
example: http://modelbank.com/offer/offer1
maxLength: 256
minLength: 1
Amount:
type: object
description: Amount of money associated with the offer type.
properties:
Amount:
$ref: '#/components/schemas/OBActiveCurrencyAndAmount_SimpleType'
Currency:
$ref: '#/components/schemas/ActiveOrHistoricCurrencyCode_1'
required:
- Amount
- Currency
Fee:
type: object
description: Fee associated with the offer type.
properties:
Amount:
$ref: '#/components/schemas/OBActiveCurrencyAndAmount_SimpleType'
Currency:
$ref: '#/components/schemas/ActiveOrHistoricCurrencyCode_1'
required:
- Amount
- Currency
required:
- AccountId
maxItems: 99999
minItems: 0
Links:
$ref: '#/components/schemas/Links'
Meta:
$ref: '#/components/schemas/Meta'
required:
- Data
nullable: false
Links:
type: object
additionalProperties: false
description: Links relevant to the payload
properties:
Self:
type: string
format: uri
First:
type: string
format: uri
Prev:
type: string
format: uri
Next:
type: string
format: uri
Last:
type: string
format: uri
required:
- Self
OBErrorResponse1:
type: object
additionalProperties: false
deprecated: false
description: An array of detail error codes, and messages, and URLs to documentation to help remediation.
properties:
Id:
type: string
description: A unique reference for the error instance, for audit purposes, in case of unknown/unclassified errors.
maxLength: 40
minLength: 1
Code:
type: string
description: Deprecated <br />High level textual error code, to help categorise the errors.
example: 400 BadRequest
maxLength: 40
minLength: 1
Message:
type: string
description: Deprecated <br />Brief Error message
example: There is something wrong with the request parameters provided
maxLength: 500
minLength: 1
Errors:
type: array
items:
$ref: '#/components/schemas/OBError1'
maxItems: 99999
minItems: 1
required:
- Errors
nullable: false
OBExternalStatusReason1Code:
type: string
description: Low level textual error code, for all enum values see `OBExternalStatusReason1Code` in *OB_Internal_CodeSet* [here](https://github.com/OpenBankingUK/External_Internal_CodeSets)
example: U001
maxLength: 4
minLength: 4
AccountId:
type: string
description: A unique and immutable identifier used to identify the account resource. This identifier has no meaning to the account owner.
example: '22289'
maxLength: 40
minLength: 1
parameters:
x-fapi-interaction-id:
name: x-fapi-interaction-id
in: header
description: An RFC4122 UID used as a correlation id.
required: false
schema:
type: string
deprecated: false
maxLength: 36
minLength: 32
pattern: ^[A-Za-f0-9]{8}-?[A-Za-f0-9]{4}-?[1-5][A-Za-f0-9]{3}-?[89ab][A-Za-f0-9]{3}-?[A-Za-f0-9]{12}$
nullable: false
example: 93bac548-d2de-4546-b106-880a5018460d
x-fapi-customer-ip-address:
name: x-fapi-customer-ip-address
in: header
description: The PSU's IP address if the PSU is currently logged in with the TPP.
required: false
schema:
type: string
maxLength: 40
minLength: 7
pattern: ^((?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])))$
nullable: false
example: 104.25.212.99
Authorization:
name: Authorization
in: header
description: An Authorisation Token as per https://tools.ietf.org/html/rfc6750
required: true
schema:
type: string
maxLength: 4871
minLength: 1
pattern: ^Bearer [A-Za-z0-9-_=]{1,256}\.\.[A-Za-z0-9-_=]{1,100}\.[A-Za-z0-9-_=]{1,4096}\.[A-Za-z0-9-_=]{1,100}$
nullable: false
example: Bearer eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0OTk4NTA5NjUsInN1YiI6IkJhcmNsYXlzX1BheW1lbnRfU2VydmljZSIsInNjb3BlIjpbImlkcy5tYW5hZ2Vfa2V5IiwiaWRzLm1hbmFnZV9jbGllbnQiXSwiaXNzIjoiaHR0cDovL2lkZW50aXR5LXNlcnZpY2UvIiwiaWF0IjoxNDk5ODUwMDY1fQ.OX-u14YLs7iksl6gnZ9ZqMBu-ekFi4pSva5mzhuf2xU
x-customer-user-agent:
name: x-customer-user-agent
in: header
description: Indicates the user-agent that the PSU is using.
required: false
schema:
type: string
deprecated: false
maxLength: 500
minLength: 1
nullable: false
example: Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7B405
AccountId:
name: accountId
in: path
description: AccountId
required: true
schema:
type: string
deprecated: false
maxLength: 20
minLength: 1
pattern: ^\d{1,20}$
nullable: false
example: '12345678901234567890'
x-fapi-auth-date:
name: x-fapi-auth-date
in: header
description: "The time when the PSU last logged in with the TPP. \nAll dates in the HTTP headers are represented as RFC 7231 Full Dates. An example is below: \nSun, 10 Sep 2017 19:43:31 UTC"
required: false
schema:
type: string
deprecated: false
maxLength: 29
minLength: 29
pattern: ^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} (GMT|UTC)$
nullable: false
example: Sun, 10 Sep 2017 19:43:31 UTC
securitySchemes:
TPPOAuth2Security:
type: oauth2
description: TPP client credential authorisation flow with the ASPSP
flows:
clientCredentials:
tokenUrl: https://authserver.example/token
scopes:
accounts: Ability to read Accounts information
PSUOAuth2Security:
type: oauth2
description: OAuth flow, it is required when the PSU needs to perform SCA with the ASPSP when a TPP wants to access an ASPSP resource owned by the PSU
flows:
authorizationCode:
authorizationUrl: https://authserver.example/authorization
tokenUrl: https://authserver.example/token
scopes:
accounts: Ability to read Accounts information