POST call, passing a JSON body as specified below.| Field | Description | Type | Mandatory |
|---|---|---|---|
| goodsRecords | Array of attribues objecs | See below for the the object structure To update an attribute also specify the progId, which is the identifier for the attribute | ā |
goodsRecords: [{
goods: {
entityCode: 6,
documentDate: "2016-04-05 00:00:00",
refDocument: 98,
causal: "SALE",
year: "2016",
movementDate: "2016-04-05 00:00:00",
currency: "EUR",
totalAmount: 666.00,
totalAmountCompany: 666.00,
totalAmountSite: 666.00,
taxFreeNumber: null,
system: "ECOMMERCE",
startDate: null,
endDate: null,
customerCode: "12345",
card: null,
cardBarcode: null,
actionType: "PURCHASE",
actionStatus: "A",
result: "INTERFACE",
description: "insertSale",
pointsMultiplier: 2.0,
consolidatedDocument: "T",
spentPoints: 100,
saleType: Type of sale (INVOICE, INV_TIC or TICKET),
receiptRt: RT Receipt number,
zReport: Z report number,
billingCustomer: progId or email of the billing customer,
cashbackAmount: value of cashback derived from the sale, if available
},
rows: [{
rowNumber: 1,
barcode: 8000200753258,
quantity: 6,
listPrice: 100.00,
salePrice: null,
discountValue: null,
listPriceCompany: 100.00,
salePriceCompany: 100.00,
discountValueCompany: 20.00,
convertionRateCompany: 1.00,
convertionRateSite: 1.00,
listPriceSite: null,
salePriceSite: null,
discountValueSite: null,
taxRate: 0.22,
vendor: "VENDOR SUBJECT_CODE",
vendorName: "Vendor name",
vendorSurname: "Vendor surname",
promotions: [{
promotion: "",
description: ""
}]
}],
tailoring: [{
causal: "XXX",
rowNumber: 1,
barcode: 67890,
quantity: 1,
listPrice: 342.00,
salePrice: 342.00,
discountValue: 321.00,
convertionRateCompany: 1.00,
listPriceCompany: null,
salePriceCompany: null,
sartorialCode: 3478543,
sartorialDenomination: "TEST",
deliveryDate: "2017-11-24 00:00:00:000",
tailor: "XXX",
tailorDenomination: "XXX"
}, {
causal: "XXX",
rowNumber: "2",
barcode: "12345",
quantity: "1",
listPrice: "342",
salePrice: "342",
discountValue: "321",
convertionRateCompany: "",
listPriceCompany: "",
salePriceCompany: "",
sartorialCode: "3478543",
sartorialDenomination: "TEST",
deliveryDate: "2017-11-24 00:00:00:000",
tailor: "YYY",
tailorDenomination: "YYY"
}],
vouchers: [{
voucherType: "TEST",
voucherBarcode: "1111111111",
entityCode: 6,
documentDate: "2017-11-24 00:00:00:000",
refDocument: "98",
amount: 100.00,
convertionRateCompany: 1.00,
amountCompany: 100.00,
spent: "T",
entityCodePurchase: 6,
documentDatePurchase: "2017-10-24 00:00:00:000",
refDocumentPurchase: "abc",
relatedSales: [{
entityCode: "Code of the entity that made the sale"
refDocument: "Document reference for the sale"
documentDate: "Document date for the sale"
}]
}],
addresses: [{
zipCode: "Zip code",
country: "Country",
note: "Notes",
address2: "Additional address information",
city: "City",
address1: "Address",
municipality: "Municipality",
mobile: "Mobile phone",
province: "Province",
phone: "Phone",
destinationType: "Address type",
state: "State",
fax: "Fax",
email: "Email"
}],
costs: [{
rowNumber: 1,
itemCode: "",
listPrice: 100.00,
salePrice: "listPrice",
listPriceCompany: 100.00,
listPriceSite: 100.00,
discountValueSite: 33.00,
convertionRateCompany: 1.00,
convertionRateSite: 1.00,
taxRate: 0.22
}],
payments: [{
paymentType: "CASH",
paymentValue: 632.21,
cashRounding: 0.01
}],
informativeBarcodes: [{
informativeBarcode: "",
description: ""
}]
}]
{
success: true,
code: 200,
message: "Insert/update successful",
errorObjects: [],
insertedObjects: [
{
progId: "2604"
}
]
}