postOrders

Operation Id:
orders/orders/post [Official Documentaction]
Methods

  • orders Array<Object>
  • orderType String
  • shopId Integer
  • stockId Integer
  • orderPaymentType 'cash_on_delivery'|'prepaid'|'tradecredit'
  • currencyId String
  • clientWithoutAccount String
  • clientWithoutAccountData Object
  • clientLogin String
  • clientNoteToOrder String
  • clientNoteToCourier String
  • affiliateId Integer
  • courierId Integer
  • pickupPointId String
  • deliveryCost Number
  • clientDeliveryAddress Object
  • payerAddress Object
  • products Array<Object>
  • orderRebateValue Number
  • orderOperatorLogin String
  • ignoreBridge Boolean
  • settings Object
  • orderSettledAtPrice 'gross'|'net'|'net_without_VAT'
  • clientRequestInvoice String
  • billingCurrency String
  • billingCurrencyRate Number
  • purchaseDate String
Examples

This function creates a post order with specific details such as shop ID, stock ID, payment type, currency, courier ID, order type, client login, client account preference, and products.

const result = await idosellRequest.postOrders
	.shopId(1)
	.stockId(1)
	.orderPaymentType("cash_on_delivery")
	.currencyId("PLN")
	.courierId(10)
	.orderType("retail")
	.clientLogin("iai_demo")
	.clientWithoutAccount("n")
	.products([{"productId":13,"sizeId":"1","productQuantity":1,"productRetailPrice":10}])
	.exec()

This function creates an order with specified details and products for a client without an account.

const result = await idosellRequest.postOrders
	.shopId(1)
	.stockId(1)
	.orderPaymentType("cash_on_delivery")
	.currencyId("PLN")
	.courierId(10)
	.orderType("retail")
	.clientWithoutAccount("y")
	.products([{"productId":13,"sizeId":"1","productQuantity":1,"productRetailPrice":10}])
	.clientWithoutAccountData({"clientFirstName":"TEST","clientLastName":"Client","clientCity":"Warsaw","clientCountry":"Polska"})
	.clientDeliveryAddress({"clientDeliveryAddressFirstName":"Test","clientDeliveryAddressLastName":"Person","clientDeliveryAddressCountry":"Polska","clientDeliveryAddressCity":"Warsaw","clientDeliveryAddressStreet":"Grzybowska","clientDeliveryAddressZipCode":"00-844"})
	.exec()