b2bsoft-ux
GET-billingAccountById-TMF666
/billingAccount/{id} [GET]
This interface is implemented by Sales force to return order line item information back to b2bSoft to display on their cart by using Salesforce Order Id as in put parameter.
Method Logic
graph LR
id1((client))
id1--> request
request --> process
process --> response
response --> id1
Process sequence diagram
Describe the api itself and their dependencies only.
sequenceDiagram
participant Client
participant ux as B2BSoft-ux
participant biz as account-management-biz
Client->>+ux: [GET]<br>[HTTP|REST]<br>/billingAccount/{id}
ux->>+biz: [GET]<br>[HTTP|REST]<br>/billingAccount/{id}
note over biz: Tranformation<br>Request
biz-->>-ux: 200
ux-->>-Client:200
alt invalid input or unsupported message type then
activate ux
ux-->>Client: 400
deactivate ux
else authentication invalid then
activate ux
ux-->>Client: 401
deactivate ux
else request not found then
activate ux
ux-->>Client: 404
deactivate ux
else businessId not implemented then
activate ux
ux-->>Client: 501
deactivate ux
else server not available or timeout then
activate ux
Client-->>+ux:
note over biz: takes too long
ux--x-Client: 500
deactivate ux
end
Uses Cases
The internal use cases to the method are defined.
Case | Description |
---|---|
1 | retrive the account details from Aira |
Request
This section defines all the possible data structures sent by the client when consuming the method.
URL
https://[localhost]:[port]/b2bsoft-ux/v1/{businessId}/billingAccount/{id}
URL PARAMS
name | type | description | required |
---|---|---|---|
businessId | string | 2 letter ISO 3166 country code (TT, BB, JM, PA, etc.) identifying the business unit. | Y |
Id | string | Billing account number. The BSS billing Account identifier. | Y |
Header
name | value | description | required |
---|---|---|---|
client_id | string | The client_id identifying the channel. Minimum characters: 5 | Y |
client_secret | string | Password associated with the client_id. Minimum characters: 5 | Y |
X-Correlation-ID | string | Identifier that correlates HTTP request between a client and server. Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction. | Y |
channelId | string | This is to identify the source (Project). Value : B2BSoft | N |
targetSystem | string | This is to identify the source (Project). Value : aria | N |
Query Param
name | type | description | required |
---|---|---|---|
fields | string | Text of the note. ex: relatedParty | N |
Response
In this section all the possible data structures received by the client at the moment of responding the method are defined.
Possible response success
This section defines all the possible data structures received by the client and that must be considered satisfactory at the time of responding to the method.
[ 200 ]
OK - GET request processed successfully, response body contains an entity corresponding to the requested resource.
{
"id": "CUSTOMER_1111116",
"state": "ACTIVE",
"relatedParty": [
{
"id": "CUSTOMER_1111116-106",
"@type": "BillingAccountRef"
}
],
"accountRelationship": [
{
"account": {
"@type": "BillingAriaAccount",
"id": "33658062"
}
},
{
"account": {
"@type": "MasterPlan",
"id": "Account_Master_Plan_1111116-106",
"name": "Account Master Plan"
}
},
{
"account": {
"@type": "MasterPlan",
"id": "2855058",
"name": "Master Plan Instance"
}
},
{
"account": {
"@type": "DunningGroupRef",
"id": "DUNNING_1111116-106",
"name": "BANx0823-CANx22x1 Dunning Group 001",
"description": "BANx0823-CANx22x1 Dunning Group 001"
}
},
{
"account": {
"@type": "DunningGroup",
"id": "2153458",
"name": "Dunning Group"
}
},
{
"account": {
"@type": "BillingGroupRef",
"id": "1280315",
"name": "BillingGroup"
}
},
{
"account": {
"@type": "BillingGroup",
"id": "BILLING_14",
"name": "Client billingGroup"
}
}
]
}
Definitions
name | type | description | required |
---|---|---|---|
Id | String | ID created on repository side | N |
state | String | Possible values for the state of the order | N |
relatedParty | Array | List of parties that have some relationship with the account, for example the customer to whom the account belongs | N |
relatedParty.id | String | Unique identifier of a related entity | N |
relatedParty.@type | String | When sub-classing, this defines the sub-class entity name | N |
accountRelationship | Array | List of balances related to the account. For example a list of billing accounts that contribute to a financial account | |
accountRelationship.account | Object | Account reference | N |
accountRelationship.account.@type | String | When sub-classing, this defines the sub-class Extensible name | N |
accountRelationship.account.id | String | The identifier of the referred entity | N |
accountRelationship.account.name | String | Name of the referred entity | N |
accountRelationship.account.description | String | Account reference. A account may be a party account or a financial account | N |
Possible response error
In this section all the possible data structures received by the client are defined and that must be considered as unsatisfactory when responding to the method.
[ 400 ]
Bad Request - the request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.
{
"errors" : [{
"code" : 400,
"message" : "The request is invalid or not properly formed.",
"description" : "The requested URI does not represent any resource on the server."
}]
}
[ 401 ]
Unauthorized - The request has not been applied because it lacks valid authentication credentials for the target resource.
{
"errors" : [{
"code" : 401,
"message" : "The user could not be authenticated for this request.",
"description" : "The request has not been applied because it lacks valid authentication credentials for the target resource"
}]
}
[ 404 ]
Not Found - server has not found a resource with that URI. This may be temporary and permanent condition. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.
{
"errors" : [{
"code" : 404,
"message" : "API_KIT:NOT_FOUD",
"description" : "The requested operation failed because a resource associated with the request could not be found."
}]
}
[ 405 ]
Method Not Allowed - HTTP method not allowed for this resource. The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.
{
"errors": [{
"code": 405,
"message": "APIKIT:METHOD_NOT_ALLOWED",
"description": "HTTP Method POST not allowed for : /{businessId}/billingAccount"
}]
}
[ 500 ]
Internal Server Error - server encountered an error processing request. This should not happen normally, but it is a generic error message, given when no more specific message is suitable.
{
"errors" : [{
"code" : 500,
"message" : "The request failed due to an internal error.",
"description": ""
}]
}
[ 501 ]
Not implemented - indicates that the server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.
{
"errors" : [{
"code" : 501,
"message" : "Not implemented",
"description" : "Operation POST /billingAccount/id for Business Id: xxxx not implemented"
}]
}
Administration and data management
In this section you define all the transformations, temporary and final repositories of the data within the method flow.
Transformation Request
In this section the matrix of all the data transformations that is carried out within the service is defined.
Original Payload | Mulesoft | transformation |
---|---|---|
payload | payload |
Transformation Response
In this section the matrix of all the data transformations that is carried out within the service is defined.
Original Payload | Mulesoft | transformation |
---|---|---|
payload | payload |
Services dependencies
This section defines all the connections to the web services and the methods that are used within the method.
Method | Type | URL | Example |
---|---|---|---|
/billingAccount/{id} | GET | /account-management-biz |