POST api/v1/purchases
Request Information
URI Parameters
None.
Body Parameters
PurchaseDtoName | Description | Type | Additional information |
---|---|---|---|
Id | globally unique identifier |
None. |
|
Date | date |
None. |
|
Total | decimal number |
None. |
|
TotalWithoutDiscount | decimal number |
None. |
|
DiscountApplied | decimal number |
None. |
|
DiscountValueApplied | decimal number |
None. |
|
FinalDiscountApplied | decimal number |
None. |
|
FinalDiscountValueApplied | decimal number |
None. |
|
SellerCode | string |
None. |
|
SellerName | string |
None. |
|
CustomerId | globally unique identifier |
None. |
|
OrganizationCode | string |
None. |
|
Description | string |
None. |
|
IsOnline | boolean |
None. |
|
GeneralDiscount | boolean |
None. |
|
Items | Collection of PurchaseItemDto |
None. |
|
CouponCode | string |
None. |
|
SourcePurchaseId | string |
None. |
Request Formats
application/json, text/json
Sample:
{ "id": "37ac60b9-4481-40bc-84b0-8d5f06045815", "date": "2025-08-31T11:50:09.8573254+00:00", "total": 1.0, "totalWithoutDiscount": 1.0, "discountApplied": 1.1, "discountValueApplied": 1.0, "finalDiscountApplied": 1.1, "finalDiscountValueApplied": 1.0, "sellerCode": "sample string 1", "sellerName": "sample string 2", "customerId": "d86c42c0-eeb1-4d69-9d42-5349a594c069", "organizationCode": "sample string 3", "description": "sample string 4", "isOnline": true, "generalDiscount": true, "items": [ { "id": "1dda76b0-4017-4fc1-aecc-cf265c6c372e", "name": "sample string 1", "barcode": "sample string 2", "price": 1.0, "priceWithoutDiscount": 1.0, "discountApplied": 1.1, "discountValueApplied": 1.0, "finalDiscountApplied": 1.1, "finalDiscountValueApplied": 1.0, "quantity": 1.0, "brandCode": "sample string 3", "brandName": "sample string 4", "productCategories": [ "sample string 1", "sample string 2" ], "productTypeCode": "sample string 5", "productCode": "sample string 6", "productName": "sample string 7", "purchaseId": "4467c805-82f8-4405-bd1c-8205c306fd9e", "customerId": "df4836b9-aa6e-4821-8ae5-96c6412c9723", "promotions": [ { "code": "sample string 1", "title": "sample string 2", "couponCode": "sample string 3" }, { "code": "sample string 1", "title": "sample string 2", "couponCode": "sample string 3" } ], "categories": [ { "id": "82cdba60-b3ce-4053-ac66-cdbbc1d76eea", "code": "sample string 1", "name": "sample string 2", "organizationCode": "sample string 3", "creationDate": "2025-08-31T11:50:09.8573254+00:00" }, { "id": "82cdba60-b3ce-4053-ac66-cdbbc1d76eea", "code": "sample string 1", "name": "sample string 2", "organizationCode": "sample string 3", "creationDate": "2025-08-31T11:50:09.8573254+00:00" } ], "purchaseDate": "2025-08-31T11:50:09.8573254+00:00", "customFields": { "sample string 1": { "code": "sample string 1", "name": "sample string 2", "stringValue": "sample string 3", "dateTimeValue": "2025-08-31T11:50:09.8573254+00:00", "intValue": 1, "boolValue": true, "type": "sample string 4" }, "sample string 2": { "code": "sample string 1", "name": "sample string 2", "stringValue": "sample string 3", "dateTimeValue": "2025-08-31T11:50:09.8573254+00:00", "intValue": 1, "boolValue": true, "type": "sample string 4" } }, "description": "sample string 9", "couponValue": "sample string 10", "total": 1.0, "totalWithoutDiscount": 1.0, "totalDiscountApplied": 1.0, "totalDiscountValueApplied": 1.0 }, { "id": "1dda76b0-4017-4fc1-aecc-cf265c6c372e", "name": "sample string 1", "barcode": "sample string 2", "price": 1.0, "priceWithoutDiscount": 1.0, "discountApplied": 1.1, "discountValueApplied": 1.0, "finalDiscountApplied": 1.1, "finalDiscountValueApplied": 1.0, "quantity": 1.0, "brandCode": "sample string 3", "brandName": "sample string 4", "productCategories": [ "sample string 1", "sample string 2" ], "productTypeCode": "sample string 5", "productCode": "sample string 6", "productName": "sample string 7", "purchaseId": "4467c805-82f8-4405-bd1c-8205c306fd9e", "customerId": "df4836b9-aa6e-4821-8ae5-96c6412c9723", "promotions": [ { "code": "sample string 1", "title": "sample string 2", "couponCode": "sample string 3" }, { "code": "sample string 1", "title": "sample string 2", "couponCode": "sample string 3" } ], "categories": [ { "id": "82cdba60-b3ce-4053-ac66-cdbbc1d76eea", "code": "sample string 1", "name": "sample string 2", "organizationCode": "sample string 3", "creationDate": "2025-08-31T11:50:09.8573254+00:00" }, { "id": "82cdba60-b3ce-4053-ac66-cdbbc1d76eea", "code": "sample string 1", "name": "sample string 2", "organizationCode": "sample string 3", "creationDate": "2025-08-31T11:50:09.8573254+00:00" } ], "purchaseDate": "2025-08-31T11:50:09.8573254+00:00", "customFields": { "sample string 1": { "code": "sample string 1", "name": "sample string 2", "stringValue": "sample string 3", "dateTimeValue": "2025-08-31T11:50:09.8573254+00:00", "intValue": 1, "boolValue": true, "type": "sample string 4" }, "sample string 2": { "code": "sample string 1", "name": "sample string 2", "stringValue": "sample string 3", "dateTimeValue": "2025-08-31T11:50:09.8573254+00:00", "intValue": 1, "boolValue": true, "type": "sample string 4" } }, "description": "sample string 9", "couponValue": "sample string 10", "total": 1.0, "totalWithoutDiscount": 1.0, "totalDiscountApplied": 1.0, "totalDiscountValueApplied": 1.0 } ], "couponCode": "sample string 6", "sourcePurchaseId": "sample string 7" }
application/xml, text/xml
Sample:
<PurchaseDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Domain.Dtos"> <CouponCode>sample string 6</CouponCode> <CustomerId>d86c42c0-eeb1-4d69-9d42-5349a594c069</CustomerId> <Date>2025-08-31T11:50:09.8573254+00:00</Date> <Description>sample string 4</Description> <DiscountApplied>1.1</DiscountApplied> <DiscountValueApplied>1</DiscountValueApplied> <FinalDiscountApplied>1.1</FinalDiscountApplied> <FinalDiscountValueApplied>1</FinalDiscountValueApplied> <GeneralDiscount>true</GeneralDiscount> <Id>37ac60b9-4481-40bc-84b0-8d5f06045815</Id> <IsOnline>true</IsOnline> <Items> <PurchaseItemDto> <Barcode>sample string 2</Barcode> <BrandCode>sample string 3</BrandCode> <BrandName>sample string 4</BrandName> <Categories> <ProductCategoryDto> <Code>sample string 1</Code> <CreationDate>2025-08-31T11:50:09.8573254+00:00</CreationDate> <Id>82cdba60-b3ce-4053-ac66-cdbbc1d76eea</Id> <Name>sample string 2</Name> <OrganizationCode>sample string 3</OrganizationCode> </ProductCategoryDto> <ProductCategoryDto> <Code>sample string 1</Code> <CreationDate>2025-08-31T11:50:09.8573254+00:00</CreationDate> <Id>82cdba60-b3ce-4053-ac66-cdbbc1d76eea</Id> <Name>sample string 2</Name> <OrganizationCode>sample string 3</OrganizationCode> </ProductCategoryDto> </Categories> <CouponValue>sample string 10</CouponValue> <CustomFields xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:KeyValueOfstringCustomFieldPurchaseDtouOHOlRpi> <d4p1:Key>sample string 1</d4p1:Key> <d4p1:Value> <BoolValue>true</BoolValue> <Code>sample string 1</Code> <DateTimeValue>2025-08-31T11:50:09.8573254+00:00</DateTimeValue> <IntValue>1</IntValue> <Name>sample string 2</Name> <StringValue>sample string 3</StringValue> <Type>sample string 4</Type> </d4p1:Value> </d4p1:KeyValueOfstringCustomFieldPurchaseDtouOHOlRpi> <d4p1:KeyValueOfstringCustomFieldPurchaseDtouOHOlRpi> <d4p1:Key>sample string 2</d4p1:Key> <d4p1:Value> <BoolValue>true</BoolValue> <Code>sample string 1</Code> <DateTimeValue>2025-08-31T11:50:09.8573254+00:00</DateTimeValue> <IntValue>1</IntValue> <Name>sample string 2</Name> <StringValue>sample string 3</StringValue> <Type>sample string 4</Type> </d4p1:Value> </d4p1:KeyValueOfstringCustomFieldPurchaseDtouOHOlRpi> </CustomFields> <CustomerId>df4836b9-aa6e-4821-8ae5-96c6412c9723</CustomerId> <Description>sample string 9</Description> <DiscountApplied>1.1</DiscountApplied> <DiscountValueApplied>1</DiscountValueApplied> <FinalDiscountApplied>1.1</FinalDiscountApplied> <FinalDiscountValueApplied>1</FinalDiscountValueApplied> <Id>1dda76b0-4017-4fc1-aecc-cf265c6c372e</Id> <Name>sample string 1</Name> <Price>1</Price> <PriceWithoutDiscount>1</PriceWithoutDiscount> <ProductCategories xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:string>sample string 1</d4p1:string> <d4p1:string>sample string 2</d4p1:string> </ProductCategories> <ProductCode>sample string 6</ProductCode> <ProductName>sample string 7</ProductName> <ProductTypeCode>sample string 5</ProductTypeCode> <Promotions> <PromotionPurchaseDto> <Code>sample string 1</Code> <CouponCode>sample string 3</CouponCode> <Title>sample string 2</Title> </PromotionPurchaseDto> <PromotionPurchaseDto> <Code>sample string 1</Code> <CouponCode>sample string 3</CouponCode> <Title>sample string 2</Title> </PromotionPurchaseDto> </Promotions> <PurchaseDate>2025-08-31T11:50:09.8573254+00:00</PurchaseDate> <PurchaseId>4467c805-82f8-4405-bd1c-8205c306fd9e</PurchaseId> <Quantity>1</Quantity> <Total>1</Total> <TotalDiscountApplied>1</TotalDiscountApplied> <TotalDiscountValueApplied>1</TotalDiscountValueApplied> <TotalWithoutDiscount>1</TotalWithoutDiscount> </PurchaseItemDto> <PurchaseItemDto> <Barcode>sample string 2</Barcode> <BrandCode>sample string 3</BrandCode> <BrandName>sample string 4</BrandName> <Categories> <ProductCategoryDto> <Code>sample string 1</Code> <CreationDate>2025-08-31T11:50:09.8573254+00:00</CreationDate> <Id>82cdba60-b3ce-4053-ac66-cdbbc1d76eea</Id> <Name>sample string 2</Name> <OrganizationCode>sample string 3</OrganizationCode> </ProductCategoryDto> <ProductCategoryDto> <Code>sample string 1</Code> <CreationDate>2025-08-31T11:50:09.8573254+00:00</CreationDate> <Id>82cdba60-b3ce-4053-ac66-cdbbc1d76eea</Id> <Name>sample string 2</Name> <OrganizationCode>sample string 3</OrganizationCode> </ProductCategoryDto> </Categories> <CouponValue>sample string 10</CouponValue> <CustomFields xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:KeyValueOfstringCustomFieldPurchaseDtouOHOlRpi> <d4p1:Key>sample string 1</d4p1:Key> <d4p1:Value> <BoolValue>true</BoolValue> <Code>sample string 1</Code> <DateTimeValue>2025-08-31T11:50:09.8573254+00:00</DateTimeValue> <IntValue>1</IntValue> <Name>sample string 2</Name> <StringValue>sample string 3</StringValue> <Type>sample string 4</Type> </d4p1:Value> </d4p1:KeyValueOfstringCustomFieldPurchaseDtouOHOlRpi> <d4p1:KeyValueOfstringCustomFieldPurchaseDtouOHOlRpi> <d4p1:Key>sample string 2</d4p1:Key> <d4p1:Value> <BoolValue>true</BoolValue> <Code>sample string 1</Code> <DateTimeValue>2025-08-31T11:50:09.8573254+00:00</DateTimeValue> <IntValue>1</IntValue> <Name>sample string 2</Name> <StringValue>sample string 3</StringValue> <Type>sample string 4</Type> </d4p1:Value> </d4p1:KeyValueOfstringCustomFieldPurchaseDtouOHOlRpi> </CustomFields> <CustomerId>df4836b9-aa6e-4821-8ae5-96c6412c9723</CustomerId> <Description>sample string 9</Description> <DiscountApplied>1.1</DiscountApplied> <DiscountValueApplied>1</DiscountValueApplied> <FinalDiscountApplied>1.1</FinalDiscountApplied> <FinalDiscountValueApplied>1</FinalDiscountValueApplied> <Id>1dda76b0-4017-4fc1-aecc-cf265c6c372e</Id> <Name>sample string 1</Name> <Price>1</Price> <PriceWithoutDiscount>1</PriceWithoutDiscount> <ProductCategories xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:string>sample string 1</d4p1:string> <d4p1:string>sample string 2</d4p1:string> </ProductCategories> <ProductCode>sample string 6</ProductCode> <ProductName>sample string 7</ProductName> <ProductTypeCode>sample string 5</ProductTypeCode> <Promotions> <PromotionPurchaseDto> <Code>sample string 1</Code> <CouponCode>sample string 3</CouponCode> <Title>sample string 2</Title> </PromotionPurchaseDto> <PromotionPurchaseDto> <Code>sample string 1</Code> <CouponCode>sample string 3</CouponCode> <Title>sample string 2</Title> </PromotionPurchaseDto> </Promotions> <PurchaseDate>2025-08-31T11:50:09.8573254+00:00</PurchaseDate> <PurchaseId>4467c805-82f8-4405-bd1c-8205c306fd9e</PurchaseId> <Quantity>1</Quantity> <Total>1</Total> <TotalDiscountApplied>1</TotalDiscountApplied> <TotalDiscountValueApplied>1</TotalDiscountValueApplied> <TotalWithoutDiscount>1</TotalWithoutDiscount> </PurchaseItemDto> </Items> <OrganizationCode>sample string 3</OrganizationCode> <SellerCode>sample string 1</SellerCode> <SellerName>sample string 2</SellerName> <SourcePurchaseId>sample string 7</SourcePurchaseId> <Total>1</Total> <TotalWithoutDiscount>1</TotalWithoutDiscount> </PurchaseDto>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
IHttpActionResultNone.
Response Formats
application/json, text/json, application/xml, text/xml
Sample:
Sample not available.