POST api/ClientLocations

Method to add a new client location to the system

Request Information

URI Parameters

None.

URI Example

api/ClientLocations

Body Parameters

The clientLocation data

Oresto.API.Models.POST.ClientLocations.ClientLocation
NameDescriptionTypeAdditional information
ClientNumber

The number of the client defined by the wholesaler

string

Primary key field

Required

Max length: 50

Company

Company name used at the address

string

Max length: 50

CountryCode

The country code of the address

string

Max length: 2

Min length: 2

ExtraAddressLine

Extra address line

string

Max length: 150

Municipality

Municipality

string

Required

Max length: 50

PhoneNumber

Phone number used at the address

string

Max length: 100

PostalCode

Postal code

string

Required

Max length: 20

Province

Province

string

Max length: 50

Remark

Additional remarks for the location

string

Max length: 500

StreetName

Street name

string

Required

Max length: 150

StreetNumber

Street number

string

Max length: 20

Request Formats

application/json, text/json

Sample:
{
  "ClientNumber": "sample string 1",
  "Remark": "sample string 2",
  "StreetName": "sample string 3",
  "StreetNumber": "sample string 4",
  "PostalCode": "sample string 5",
  "Municipality": "sample string 6",
  "PhoneNumber": "sample string 7",
  "CountryCode": "sample string 8",
  "ExtraAddressLine": "sample string 9",
  "Company": "sample string 10",
  "Province": "sample string 11"
}

application/xml, text/xml

Sample:
<ClientLocation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Oresto.API.Models.POST.ClientLocations">
  <ClientNumber>sample string 1</ClientNumber>
  <Company>sample string 10</Company>
  <CountryCode>sample string 8</CountryCode>
  <ExtraAddressLine>sample string 9</ExtraAddressLine>
  <Municipality>sample string 6</Municipality>
  <PhoneNumber>sample string 7</PhoneNumber>
  <PostalCode>sample string 5</PostalCode>
  <Province>sample string 11</Province>
  <Remark>sample string 2</Remark>
  <StreetName>sample string 3</StreetName>
  <StreetNumber>sample string 4</StreetNumber>
</ClientLocation>

application/x-www-form-urlencoded

Sample:
ClientNumber=value&Remark=value&StreetName=value&StreetNumber=value&PostalCode=value&Municipality=value&PhoneNumber=value&CountryCode=value&ExtraAddressLine=value&Company=value&Province=value

Response Information

Resource Description

A wrapper class with information about the new entity

Oresto.API.Models.POST.ClientLocations.ClientLocationData
NameDescriptionTypeAdditional information
ClientLocationId

Newly created client location id

integer

None.

Errors

Possible errors that were experienced when processing the request

Collection of string

None.

ModelStateErrors

Possible model errors that were experienced when validating the data

Collection of Oresto.API.Models.Shared.ModelStateError

None.

RequestInformation

Additional information about the request

Oresto.API.Models.Shared.RequestInformation

None.

Response Formats

application/json, text/json

Sample:
{
  "ClientLocationId": 1,
  "RequestInformation": {
    "RequestDuration": 1,
    "WholesalerId": 2,
    "UserId": 3
  },
  "ModelStateErrors": [
    {
      "Key": "sample string 1",
      "Message": "sample string 2",
      "Exception": "sample string 3"
    },
    {
      "Key": "sample string 1",
      "Message": "sample string 2",
      "Exception": "sample string 3"
    }
  ],
  "Errors": [
    "sample string 1",
    "sample string 2"
  ]
}

application/xml, text/xml

Sample:
<ClientLocationData xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Oresto.API.Models.POST.ClientLocations">
  <Errors xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.datacontract.org/2004/07/Oresto.API.Models.Shared">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </Errors>
  <ModelStateErrors xmlns="http://schemas.datacontract.org/2004/07/Oresto.API.Models.Shared">
    <ModelStateError>
      <Exception>sample string 3</Exception>
      <Key>sample string 1</Key>
      <Message>sample string 2</Message>
    </ModelStateError>
    <ModelStateError>
      <Exception>sample string 3</Exception>
      <Key>sample string 1</Key>
      <Message>sample string 2</Message>
    </ModelStateError>
  </ModelStateErrors>
  <RequestInformation xmlns="http://schemas.datacontract.org/2004/07/Oresto.API.Models.Shared">
    <RequestDuration>1</RequestDuration>
    <UserId>3</UserId>
    <WholesalerId>2</WholesalerId>
  </RequestInformation>
  <ClientLocationId>1</ClientLocationId>
</ClientLocationData>