dxp-ux

(0 reviews)

Patch-billingAccountById

updateBillingAccount

PATCH

This operation retrieves a BillingAccount entity. Attribute selection is enabled for all first level attributes.

Request

This section defines all the possible data structures sent by the client when consuming the method.

URL

https://[localhost]:[port]/dxp-ux/v1/{businessId}/billingAccount/{id}

URL PARAMS

nametypedescriptionrequired
businessIdstring2 letter ISO 3166 country code (PR, JM, PA, etc.) identifying the business unit.Y
idstringBilling Account IdY
namevaluedescriptionrequired
client_idstringThe client_id identifying the channel. Minimum characters: 5Y
client_secretstringPassword associated with the client_id. Minimum characters: 5Y
channeIdstringChannel to identify the business group.
Can be: "APP"
Y
X-Correlation-IDstringAn identifier for the current call chain that can be used to tie together log entries on multiple layers (e.g. client, server, mainframe). This identifier must be designed to be unique across all applications.
Pattern: ^[a-zA-Z0-9-+/=_]{16,64}$
Minimum characters: 16
Maximum characters: 64
N
lobStringNote :
Mobile users: PREPAID, POSTPAID
Fixed users : FIXED.
Fixed is in scope for Dxp-ux
Y

Request

In this section all the possible data structures received by the client at the moment of responding the method are defined.

{
    "@type": "BillingAccount",
    "contact": [
        {
            "contactType": "Primary",
            "contactMedium": [
                {
                    "mediumType": "Address",
                    "characteristic": {
                        "city": "Paris",
                        "postCode": "75014",
                        "stateOrProvince": "",
                        "street1": "16 Rue des Canards",
                        "street2": ""
                    }
                }
            ]
        }
    ]
}
Definitions

Each of the request parameters is detailed.

nametyperequireddescription
@typestringNDefault value is "BillingAccount"
contactArrayY
contact/contactTypestringNDefault value is "Primary"
contact/contactMediumArray ContactMedium[*]YIndicates the contact medium that could be used to contact the party.
contact/contactMedium/mediumTypestringYType of the contact medium, such as: email address, telephone number, postal address. Default value is "Address"
contact/contactMedium/characteristicobject MediumCharacteristicYAny additional characteristic(s) of this contact medium. one address field should be present to update it in Target system.
contact/contactMedium/characteristic/citystringNCity
contact/contactMedium/characteristic/postCodestringNPostcode
contact/contactMedium/characteristic/stateOrProvincestringNState or province. Possible value is "PR"
contact/contactMedium/characteristic/street1stringNDescribes the street
contact/contactMedium/characteristic/street2stringNComplementary street description

Response

In this section all the possible data structures received by the client at the moment of responding the method are defined.

[ 200 ]

OK - updateBillingAccount request processed successfully, response body contains an entity corresponding to the requested resource.

Response
{
    "id": "8211990010005718",
    "accountType": "RES",
    "name": "ACCOUNT SH RESIDENTIAL",
    "contact": [
        {
            "contactName": "ACCOUNT SH RESIDENTIAL",
            "contactMedium": [
                {
                    "mediumType": "Address",
                    "characterstic": {
                        "contactType": "BillingAddress",
                        "stateOrProvince": "PR",
                        "city": "PARIS",
                        "street1": "16 RUE DES CANARDS",
                        "street2": "TEST",
                        "postCode": "75014    "
                    }
                },
                {
                    "mediumType": "Phone",
                    "characteristic": {
                        "contactType": "Home",
                        "phoneNumber": "7879257001"
                    }
                }
            ]
        }
    ],
    "creditLimit": {
        "unit": "USD",
        "value": 100.00
    },
    "@type": "BillingAccount"
}
Definitions

Each of the request parameters is detailed.

nametyperequireddescription
idstringNUnique identifier of the account
accountTypestringNA categorization of an account Sample values "RES", "COM"
namestringNName of the account
@typestringNDefault value is "BillingAccount"
contactArrayNAn individual or an organization used as a contact point for a given account and accessed via some contact medium.
contactNamestringN
contact/contactMediumArray ContactMedium[*]NIndicates the contact medium that could be used to contact the party.
contact/contactMedium/mediumTypestringNType of the contact medium, such as: email address, telephone number, postal address. Default value is "Address"
contact/contactMedium/characteristicobject MediumCharacteristicNAny additional characteristic(s) of this contact medium. Address is coming in uppercase from backend system.
contact/contactMedium/characteristic/contactTypestringNpossible value is "BillingAddress"
contact/contactMedium/characteristic/citystringNCity
contact/contactMedium/characteristic/postCodestringNPostcode
contact/contactMedium/characteristic/stateOrProvincestringNState or province
contact/contactMedium/characteristic/street1stringNDescribes the street
contact/contactMedium/characteristic/street2stringNComplementary street description
contact/contactMedium/characteristic/phoneNumberstringNPhone number
creditLimitobjectNThe maximum amount of money that may be charged on an account
creditLimit/unitstringNCurrency (ISO4217 norm uses 3 letters to define the currency)
creditLimit/valuenumberNA positive floating point number

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 client sent too many requests and server is not able to serve them all at the moment"
    }]
}
[ 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"
    }]
}
[ 403 ]

Forbidden - Indicates that the server understood the request but refuses to fulfill it. If authentication credentials were provided in the request, the server considers them insufficient to grant access. The client SHOULD NOT automatically repeat the request with the same credentials. The client MAY repeat the request with new or different credentials.

[ 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" : "The request is invalid or not properly formed.",
      "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"
        }]
}
[ 429 ]

Too Many Requests - client has sent too many requests in a space of time (rate limiting). When a server is under attack or just receiving a very large number of requests from a single party, responding to each with a 429 status code will consume resources. Therefore, servers may drop connections or take other steps instead of responding with the 429 status code, when limiting resource usage.

{
  "errors" : [{
      "code" : 429,
       "message" : "The request is invalid or not properly formed.",
      "description" : "The requested operation failed because a resource associated with the request could not be found."
    }]
}
[ 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 PATCH /billingAccount/11111 for Business Id: xxxx not implemented"
    }]
  }
[ 502]

Bad Gateway - gateway is available but backend service is not. The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request.

[ 503 ]

Service Unavailable - temporary maintenance of service, try again later. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay will be indicated in a Retry-After header. If no Retry-After is given, the client SHOULD handle the response as it would for a 500 response. Note: The existence of the 503 status code does not imply that a server will use it when becoming overloaded. Servers may simply refuse the connection.

    Retry-After: 120

Reviews