A raw purchase contains all the necessary information for the order chain. It contains information about the customer, including contact information and shipping details. It contains content information, such as regular order information, with fees and rows, but also potential subscriptions. It contains information about how payments are handled and how deliveries are handled.
| name | data type | description |
|---|---|---|
| string | The social security number of the customer. Mutually exclusive with companyName and organizationNumber.
|
|
| firstName | string | The first name of the customer. Mutually exclusive with 'companyName'. |
| lastName | string | The last name of the customer. Mutually exclusive with 'companyName'. |
| organizationNumber | string | The organization number of the customer. Mutually exclusive with firstName, lastName and
socialSecurityNumber.
|
| companyName | string | The company name of the customer. Mutually exclusive with firstName, lastName and socialSecurityNumber.
|
| string | The email address of the customer. | |
| alternativeEmailAddress | string | The alternative email address of the customer. |
| landline | string | The landline phone number of the customer. |
| cellphone | string | The cellphone number of the customer. |
| gender | Sex | The gender of the customer. |
| additionalOrderText | string | The Additional order text on the purchase. |
| sellerDepartment | string | For sales handled by third parties, typically TM call centers - the department that the seller belongs to. The order/subscription's createdBy field will be updated with the department (and sellerPerson) |
| sellerPerson | string | For sales handled by third parties, typically TM call centers - the name/identifier of the seller person. The order/subscription's createdBy field will be updated with the seller (and sellerDepartment) |
| notes | string | A free text that will be stored in the order's/subscription's list of notes. |
| nextDeliveryDate | string | For orders: earliest delivery date. For subscriptions: suggested next delivery date. Defaulted to today's date. |
| orderDate | string | For orders: the order date. For subscription: the starting date. Defaulted to nextDeliveryDate if specified, otherwise today's date |
| languageCode | Language | Language code. |
| dateOfBirth | string | Date of birth of the customer. |
| customFields | array of CustomField | Custom fields. |
| remoteAddress | string | The remote client address. |
| address | Address | The address of the purchase. This will override the customer address, if a customer is set. This is the default address. |
| deliveryAddress | AddressWithName | The delivery address of the purchase. This will override the customer delivery address, if a customer is set. |
| integritiesMap | map of boolean | The map of integrities that the customer opts out or opts in to. |
| |
|
|
| customerNumber | string | The customer number. |
| |
|
paymentMethodName |
| paymentMethodName | string | The name of the payment method. |
| |
|
Use paymentReferences instead. |
| |
|
deliveryMethodName |
| deliveryMethodName | string | The name of the payment method. |
| deliveryPointCode | string | The code of the optional delivery point. |
| termsOfDeliveryCode | string | The code of the terms of delivery. |
| termsOfPaymentCode | string | The code of the terms of payment. |
| marketingCampaignCode | string | The code of the marketing campaign. |
| storeNumber | string | The number of the physical store that this purchase was made within. This value is not to be confused with a delivery point when using Click & Collect. |
| methodOfArrivalNumber | string | The number of the method of arrival (or "channel"). |
| |
|
shippingFeeIncludingTax. Having both values will cause the deprecated one to be overridden. |
| |
|
paymentFeeIncludingTax. Having both values will cause the deprecated one to be overridden. |
| |
|
serviceFeeIncludingTax. Having both values will cause the deprecated one to be overridden. |
| discount | number | The head-level discount of the purchase. Not to be confused with row-level discount. |
| googleAnalyticsId | string | Google Analytics Client Id. This Id is used to track anonymous users and their actions. Purchase data will be pushed to google analytics with this id. |
| rows | array of RawPurchaseOrderRow | The regular stock keeping unit rows of this purchase. |
| subscriptions | array of RawPurchaseSubscriptionRow | The subscription rows of this purchase. |
| flexibleSubscriptions | array of RawPurchaseFlexibleSubscription | The flexible subscriptions of this purchase. |
| paymentReferences | array of RawPurchasePaymentReference | The references of the payment, if the payment method requires it. |
| serviceFeeTaxRate | number | The tax rate of the service fee of the purchase. |
| serviceFeeIncludingTax | number | The service fee of the purchase. Only applicable for normal purchases. |
| serviceFeeExcludingTax | number | The service fee excluding tax of the purchase. Only applicable for normal purchases. |
| shippingFeeTaxRate | number | The tax rate of the shipping fee of the purchase. |
| shippingFeeIncludingTax | number | The shipping fee of the purchase. |
| shippingFeeExcludingTax | number | The shipping fee excluding tax of the purchase. |
| paymentFeeTaxRate | number | The tax rate of the payment fee of the purchase. |
| paymentFeeIncludingTax | number | The payment fee of the purchase. |
| paymentFeeExcludingTax | number | The payment fee excluding tax of the purchase. |
Example
{
"socialSecurityNumber" : "...",
"firstName" : "...",
"lastName" : "...",
"organizationNumber" : "...",
"companyName" : "...",
"email" : "...",
"alternativeEmailAddress" : "...",
"landline" : "...",
"cellphone" : "...",
"gender" : "WOMAN",
"additionalOrderText" : "...",
"sellerDepartment" : "...",
"sellerPerson" : "...",
"notes" : "...",
"nextDeliveryDate" : "...",
"orderDate" : "...",
"languageCode" : "pl",
"dateOfBirth" : "...",
"customFields" : [ {
"code" : "...",
"value" : "..."
}, {
"code" : "...",
"value" : "..."
} ],
"remoteAddress" : "...",
"address" : {
"countryCode" : "SE",
"addressLine1" : "Druveforsvägen 8",
"careOf" : "...",
"city" : "BORÅS",
"zipcode" : "50454",
"administrativeDivision" : "..."
},
"deliveryAddress" : {
"firstName" : "...",
"lastName" : "...",
"companyName" : "Viskan System AB",
"countryCode" : "SE",
"addressLine1" : "Druveforsvägen 8",
"careOf" : "...",
"city" : "BORÅS",
"zipcode" : "50454",
"administrativeDivision" : "..."
},
"integritiesMap" : {
"EMAIL_INFO" : true,
"SMS_INFO" : false
},
"customerNumber" : "...",
"paymentMethodName" : "...",
"deliveryMethodName" : "...",
"deliveryPointCode" : "...",
"termsOfDeliveryCode" : "...",
"termsOfPaymentCode" : "...",
"marketingCampaignCode" : "...",
"storeNumber" : "...",
"methodOfArrivalNumber" : "...",
"discount" : 12345.0,
"googleAnalyticsId" : "...",
"rows" : [ {
"stockKeepingUnitId" : 12345,
"priceLookUpNumber" : "...",
"discountIncludingTax" : 12345.0,
"quantity" : 1,
"discountExcludingTax" : 12345.0,
"taxRate" : 0.25,
"unitPriceExcludingTax" : 12345.0,
"unitPriceIncludingTax" : 12345.0
}, {
"stockKeepingUnitId" : 12345,
"priceLookUpNumber" : "...",
"discountIncludingTax" : 12345.0,
"quantity" : 12345,
"discountExcludingTax" : 12345.0,
"taxRate" : 12345.0,
"unitPriceExcludingTax" : 12345.0,
"unitPriceIncludingTax" : 12345.0
} ],
"subscriptions" : [ {
"templateCode" : "...",
"createInitialOrderDirectly" : true
}, {
"templateCode" : "...",
"createInitialOrderDirectly" : true
} ],
"flexibleSubscriptions" : [ {
"interval" : 12345,
"createInitialOrderDirectly" : true,
"rows" : [ {
"stockKeepingUnitId" : 12345,
"discounts" : [ { }, { } ],
"priceLookUpNumber" : "...",
"quantity" : 1,
"taxRate" : 0.25,
"unitPriceExcludingTax" : 12345.0,
"unitPriceIncludingTax" : 12345.0
}, {
"stockKeepingUnitId" : 12345,
"discounts" : [ { }, { } ],
"priceLookUpNumber" : "...",
"quantity" : 12345,
"taxRate" : 12345.0,
"unitPriceExcludingTax" : 12345.0,
"unitPriceIncludingTax" : 12345.0
} ]
}, {
"interval" : 12345,
"createInitialOrderDirectly" : true,
"rows" : [ {
"stockKeepingUnitId" : 12345,
"discounts" : [ { }, { } ],
"priceLookUpNumber" : "...",
"quantity" : 12345,
"taxRate" : 12345.0,
"unitPriceExcludingTax" : 12345.0,
"unitPriceIncludingTax" : 12345.0
}, {
"stockKeepingUnitId" : 12345,
"discounts" : [ { }, { } ],
"priceLookUpNumber" : "...",
"quantity" : 12345,
"taxRate" : 12345.0,
"unitPriceExcludingTax" : 12345.0,
"unitPriceIncludingTax" : 12345.0
} ]
} ],
"paymentReferences" : [ {
"amount" : 12345.0,
"reference" : "...",
"externalReference" : "...",
"paymentMethodCode" : "...",
"paymentMethodType" : "...",
"transactionType" : "REFUND",
"forSubscription" : true,
"forOrder" : true,
"parentReference" : "..."
}, {
"amount" : 12345.0,
"reference" : "...",
"externalReference" : "...",
"paymentMethodCode" : "...",
"paymentMethodType" : "...",
"transactionType" : "REFUND",
"forSubscription" : true,
"forOrder" : true,
"parentReference" : "..."
} ],
"serviceFeeTaxRate" : 12345.0,
"serviceFeeIncludingTax" : 12345.0,
"serviceFeeExcludingTax" : 12345.0,
"shippingFeeTaxRate" : 12345.0,
"shippingFeeIncludingTax" : 12345.0,
"shippingFeeExcludingTax" : 12345.0,
"paymentFeeTaxRate" : 12345.0,
"paymentFeeIncludingTax" : 12345.0,
"paymentFeeExcludingTax" : 12345.0
}