My Products
Help
Flashnode-developers
CONTRIBUTOR *

Example data for POST customer?

by Flashnode-developers

Hi,

 

I am trying to test customer creation via the swagger. Do you have any example working payload for creating customer? It helped a lot when I found one for post SalesOrder, so I hope you have and example for customer data too.

 

THanks

1 REPLY 1
Accepted solution
Yıldırım
VISMA

by Yıldırım

Hi, 

 

Payloads may vary depending on your Financials ERP Company that you send the request. For instance, if the company is using autoNumbering for the customer, then the number field is not necessary to be used in the payload.

 

However, here you can see a generic POST Customer JSON. Make sure to adjust the fields based on your company data.

{
    "number": {
        "value": "106221"
    },
    "name": {
        "value": "CustomerNameTest"
    },
    "status": {
        "value": "Active"
    },
    "vatRegistrationId": {
        "value": "999999999"
    },
    "corporateId": {
        "value": "999999999"
    },
    "overrideWithClassValues": true,
    "customerClassId": {
        "value": "1"
    },
    "mainAddress": {
        "value": {
            "addressLine1": {
                "value": "Test"
            },
            "postalCode": {
                "value": "6270"
            },
            "city": {
                "value": "BRATTVÅG"
            }
        }
    },
    "mainContact": {
        "value": {
            "name": {
                "value": "TestName"
            },
            "attention": {
                "value": "TEST"
            },
            "email": {
                "value": "test@visma.com"
            },
            "phone1": {
                "value": "11111111"
            },
            "phone2": {
                "value": "22222222"
            }
        }
    },
    "deliveryAddress": {
        "value": {
            "addressLine1": {
                "value": "Ulla"
            },
            "addressLine2": {
                "value": "222"
            },
            "addressLine3": {
                "value": "333"
            },
            "postalCode": {
                "value": "6290"
            },
            "city": {
                "value": "HARAMSØY"
            }
        }
    }
}