Update buyer information (v2)

Updates Buyer information on a basket. If no Payer is associated with the Basket or the Payer is the same as the Buyer then Payer will also be updated. The same applies to ShipTo.

Request
query Parameters
basketId
required
integer <int32>

The internal id of the basket to update.

updatedBy
required
integer <int32>

Account internal id of current user.

pricelistSeed
string

A comma separated list of internal pricelist ids to use, if any. PriceLists supplied must be valid, either from the application's public priceList or any customer or company priceLists or any valid client priceLists. For clients configured to use priceListSeed exclusively in the API only the supplied priceLists will be used. If this is not configured, the supplied priceLists will be appended to the valid priceLists. If none is supplied, the default value for the application will be used in combination with any customer or company priceLists. This applies to both configurations.

dropPointSize
string

Maximum number of drop points to return for each delivery method.

cultureCode
string

Specifies in which language to display culture specific information. If none is supplied, value is resolved from Application.

currencyId
string

Internal id that specifies in which currency to display prices. If none is supplied, value is resolved from Application.

Request Body schema:

The actual Customer to use as Buyer. The Customer can optionally have one Company. If more than one Company is specified, the first will be used. Addresses will be resolve by first looking at the Company and then on the Customer. See UpdatePayer and UpdateShip on details regarding updating these address types.

Id
integer or null <int32>

The internal Storm Id of the Customer. When creating a new Customer leave this blank as Storm will generate the Id.

Key
string <guid>

The system wide unique Key of the Customer.

Code
string

The external code. Usually the id in the erp system. MaxLength: 50.

Email
string

The Email address of the Customer. MaxLength: 255.

SSN
string

The social security number of the Customer. Used to identify the Customer for some payment methods. MaxLength: 50.

FirstName
string

The FirstName of the Customer. MaxLength: 50.

LastName
string

The LastName of the Customer. MaxLength: 50.

Phone
string

The PhoneNumber of the Customer. MaxLength: 50.

CellPhone
string

The CellPhone number of the Customer. MaxLength: 50.

ReferId
integer or null <int32>

Used to tag a Customer with some external id.

ReferUrl
string

Used to tag a Customer with an incoming URL. MaxLength: 255.

object <CustomersAccount> (CustomersAccount)
Array of objects <CustomersCompany> (CustomersCompany)

A list of Companies. A Customer can have many Companies. The first will be used as default. In the Checkout process just pass in one Company if any is to be used or the first will be used as default.

Array of objects <CustomersAddress> (CustomersAddress)

A list of delivery Addresses for the Customer. When needed the first address in the list will be used. So it is vital in the checkout process to either sort them or just supply one delivery address. Company addresses will override Customer addresses if both exists in the Checkout process.

object <CustomersAddress> (CustomersAddress)
Array of objects <CustomersFlag> (CustomersFlag)

A list of Flags for the Customer. See Flag for information about flags. Flags can be used in Promotions or otherwise to provide custom handling of specific Customers.

UseInvoiceAddressAsDeliveryAddress
boolean

Can be use when updating or inserting addresses on Customer. If set to true the invoice address will be used as a delivery address as well. Then just an invoice address needs to be passed in. The deliveryAddress will be ignored. If set to false both invoice address and delivery address must be specified.

Array of objects <IdValue> (IdValue)

Contains a list of id-value pairs specific to the client for this customer. Use ApplicationService.ListCustomerInfoTypes for id lookup.

PricelistIds
Array of integers <int32>

Contains a list of priceList ids valid for this customer. It will be empty if no priceLists exist. It can be used to check products lists if they are from a customer specific priceList. No need to pass this into List-methods since they are considered any way in the methods. This property should be considered as ReadOnly as priceLists are maintained else where.

CrmId
string

Used to save the Customers external id from a crm-system MaxLength: 50.

IsActive
boolean or null

Specifies if the Customer is active or not.

Created
string or null <date-time>

When the customer was created.

Updated
string or null <date-time>

When the customer was last updated.

Responses
200

Success

400

Bad Request

Key: BasketNotEditable. Gets raised when the basket is not editable or already paid for.

Key: InvalidCompanyOnBasket. Gets raised when the basket has an invalid company. The customer does not exist in this company.

Key: QuotationMissing. Gets raised when the basket is missing.

500

Internal Server Error

post/ShoppingService.svc/rest/UpdateBuyer2
Request samples
{
  • "Id": 0,
  • "Key": "string",
  • "Code": "string",
  • "Email": "string",
  • "SSN": "string",
  • "FirstName": "string",
  • "LastName": "string",
  • "Phone": "string",
  • "CellPhone": "string",
  • "ReferId": 0,
  • "ReferUrl": "string",
  • "Account": {
    },
  • "Companies": [
    ],
  • "DeliveryAddresses": [
    ],
  • "InvoiceAddress": {
    },
  • "Flags": [
    ],
  • "UseInvoiceAddressAsDeliveryAddress": true,
  • "Info": [
    ],
  • "PricelistIds": [
    ],
  • "CrmId": "string",
  • "IsActive": true,
  • "Created": "2019-08-24T14:15:22Z",
  • "Updated": "2019-08-24T14:15:22Z"
}
Response samples
{
  • "Basket": {
    },
  • "Buyer": {
    },
  • "Payer": {
    },
  • "ShipTo": {
    },
  • "PaymentMethods": [
    ],
  • "DeliveryMethods": [
    ],
  • "Payments": [
    ]
}