Skip to main content

Update Corporate Customer

This

APIendpoint
PUT 
CUSTOMER_UUID}

Authentication

Include

aBearer Tokeninheader.Youcanobtaintokenfrom

Send

If

theAPIa510
allows you to update the details of an existing corporate customer. You can modify information such as their name, email, phone number, and address.


Endpoint

:https://demo-api.frontpayment.no/api/v1/connect/customers/update/corporate/{CustomerUuid}
Method: PUT
the Authorization : Bearer
Payloadthis Validations : Front Payment.

Example:

'countryCode'Authorization: =>Bearer 'required|string',YOUR_FRONTPAYMENT_BEARER_TOKEN
'msisdn' => 'required|string',
'email' => 'required|email',
'name' => 'required|string',
'preferredLanguage' => 'required|string',
'addresses.billing' => 'required|array',
'addresses.billing.street' => 'required|string',
'addresses.billing.zip' => 'required|string',
'addresses.billing.city' => 'required|string',
'addresses.billing.country' => 'required|string|in:ISO Alpha 2',
'addresses.shipping' => 'nullable|array',
'addresses.shipping.street' => 'nullable|string',
'addresses.shipping.zip' => 'nullable|string',
'addresses.shipping.city' => 'nullable|string',
'addresses.shipping.country' => 'nullable|string|in:ISO Alpha 2'
'organizationId' => 'required|string|regex:/^[a-zA-Z0-9]+$/',
'additionalContact' => 'nullable|array',
'additionalContact.*.name' => 'nullable|string',
'additionalContact.*.designation' => 'nullable|string',
'additionalContact.*.countryCode' => 'nullable|string',
'additionalContact.*.msisdn' => 'nullable|string',
'additionalContact.*.email' => 'nullable|email',
'additionalContact.*.note' => 'nullable|string'

Example

Request Payload

:the following JSON object in the request body:

{
    "name": "Kari Nordmann",
    "organizationId": 192933933,
    "preferredLanguage": "en",
    "msisdn": "46567468",
    "email": "[email protected]",
    "countryCode": "+47",
    "addresses": {
        "billing": {
            "street": "Luramyrveien 65",
            "zip": "4313",
            "city": "Sandnes",
            "country": "NO"
        },
        "shipping": {
            "street": "Luramyrveien 65",
            "zip": "4313",
            "city": "Oslo",
            "country": "NO"
        }
    },
    "additionalContact": {
        "0": {
            "name": "Tomas Simonen",
            "email": "[email protected]",
            "designation": "CEO",
            "countryCode": "+88",
            "msisdn": "0175272184121",
            "note": "Note goes here"
        },
        "1": {
            "name": "Tomas Simonen",
            "email": "[email protected]",
            "designation": "CEO",
            "countryCode": "+88",
            "msisdn": "0175272661841",
            "note": "Note goes here"
    }
}
}

Validation Rules

Make sure your request meets the following requirements:

FieldTypeDescription
namestringRequired Customer's full name.
Response Structureemail :email Required Customer's email address.
countryCodestringRequired Country code for the customer's phone number (e.g., "+47").
msisdnstringRequired Mobile Subscriber ISDN Number (phone number).
preferredLanguagestringRequired Customer preferred language. Available languages are en, no, sv, da, de.
organizationIdstringOptional Organization identification number, must contain only numbers and cannot contain spaces.
addressesarrayRequired Customer's billing and shipping address.
addresses.billing.streetstringRequired Street address of the customer.
addresses.billing.zipstringRequired Zip code of the customer's address.
addresses.billing.citystringRequired City of the customer's address.
addresses.billing.countrystringRequired ISO Alpha-2 country code (e.g., NO). Custom validation IsoAlpha2Country applies.
addresses.shipping.streetstringOptional Street address of the customer.
addresses.shipping.zipstringOptional Zip code of the customer's address.
addresses.shipping.citystringOptional City of the customer's address.
addresses.shipping.countrystringOptional ISO Alpha-2 country code (e.g., NO). Custom validation IsoAlpha2Country applies.
additionalContact.*.namestringOptional Additional Contact person Name.
additionalContact.*.designationstringOptional Additional Contact person designation
additionalContact.*.countryCodestringOptional Country code for the additional contact person phone number (e.g., "+47").
additionalContact.*.msisdnstringOptional Mobile Subscriber ISDN Number (phone number).
additionalContact.*.emailstringOptional Additional contact person email address.
additionalContact.*.notestringOptional Additional contact person notes.

Response

A successful request returns 202 OK:

{
    "status_code": 202,
    "status_message": "OK",
    "message": "customerUpdatedSuccessfully",
    "is_data": false,
    "data": null
}
Examplereturns Response :error, it indicates a server-side failure:

{
    "status_code": 202,510,
    "status_message": "OK"Execution Exception Occurred",
    "message": "customerUpdatedSuccessfully"somethingWentWrong",
    "is_data"is_error": false,true,
    "data"errors": null"Array"
}