POST v1/purchases/BulkCreate?preview={preview}

Documentation for 'BulkCreate'.

Request Information

Parameters

NameDescriptionAdditional information
bulkPurchase
Documentation for 'bulkPurchase'.

Define this parameter in the request body.

preview
Documentation for 'preview'.

Define this parameter in the request URI.

Request body formats

application/json, text/json

Sample:
Click to beautify!
{
  "customerId": 1,
  "autoPurchase": true,
  "purchases": [
    {
      "productId": 1,
      "quantity": 1.0,
      "name": "sample string 2",
      "description": "sample string 3",
      "overridePriceRanges": [
        {
          "min": 1.0,
          "max": 1.0,
          "amount": 2.0
        },
        {
          "min": 1.0,
          "max": 1.0,
          "amount": 2.0
        },
        {
          "min": 1.0,
          "max": 1.0,
          "amount": 2.0
        }
      ],
      "pricingModelType": "sample string 4",
      "pricingFormulaType": "sample string 5",
      "customFields": [
        {
          "key": "sample string 1",
          "value": {}
        },
        {
          "key": "sample string 1",
          "value": {}
        },
        {
          "key": "sample string 1",
          "value": {}
        }
      ],
      "discounts": [
        {
          "discountType": "sample string 1",
          "amount": 2.0
        },
        {
          "discountType": "sample string 1",
          "amount": 2.0
        },
        {
          "discountType": "sample string 1",
          "amount": 2.0
        }
      ],
      "productItems": [
        {
          "reference": "sample string 1",
          "name": "sample string 2",
          "description": "sample string 3"
        },
        {
          "reference": "sample string 1",
          "name": "sample string 2",
          "description": "sample string 3"
        },
        {
          "reference": "sample string 1",
          "name": "sample string 2",
          "description": "sample string 3"
        }
      ],
      "couponCodes": [
        "sample string 1",
        "sample string 2",
        "sample string 3"
      ],
      "earningSettings": {
        "earningSchedules": [
          {
            "scheduledType": "sample string 1",
            "scheduledInterval": "sample string 2",
            "numberOfIntervals": 1,
            "scheduledAmount": 1.0,
            "reference": "sample string 3"
          },
          {
            "scheduledType": "sample string 1",
            "scheduledInterval": "sample string 2",
            "numberOfIntervals": 1,
            "scheduledAmount": 1.0,
            "reference": "sample string 3"
          },
          {
            "scheduledType": "sample string 1",
            "scheduledInterval": "sample string 2",
            "numberOfIntervals": 1,
            "scheduledAmount": 1.0,
            "reference": "sample string 3"
          }
        ],
        "earningInterval": "sample string 1",
        "earningNumberOfIntervals": 1,
        "earningTimingInterval": "sample string 2",
        "earningTimingType": "sample string 3"
      },
      "netsuiteClassId": "sample string 6",
      "netsuiteLocationId": "sample string 7",
      "targetOrderQuantity": 1.0,
      "netsuiteBinId": "sample string 8",
      "invoiceOwner": "sample string 9",
      "skipCouponValidation": true,
      "hubspotDealId": 11,
      "quickBooksClassId": "sample string 12"
    },
    {
      "productId": 1,
      "quantity": 1.0,
      "name": "sample string 2",
      "description": "sample string 3",
      "overridePriceRanges": [
        {
          "min": 1.0,
          "max": 1.0,
          "amount": 2.0
        },
        {
          "min": 1.0,
          "max": 1.0,
          "amount": 2.0
        },
        {
          "min": 1.0,
          "max": 1.0,
          "amount": 2.0
        }
      ],
      "pricingModelType": "sample string 4",
      "pricingFormulaType": "sample string 5",
      "customFields": [
        {
          "key": "sample string 1",
          "value": {}
        },
        {
          "key": "sample string 1",
          "value": {}
        },
        {
          "key": "sample string 1",
          "value": {}
        }
      ],
      "discounts": [
        {
          "discountType": "sample string 1",
          "amount": 2.0
        },
        {
          "discountType": "sample string 1",
          "amount": 2.0
        },
        {
          "discountType": "sample string 1",
          "amount": 2.0
        }
      ],
      "productItems": [
        {
          "reference": "sample string 1",
          "name": "sample string 2",
          "description": "sample string 3"
        },
        {
          "reference": "sample string 1",
          "name": "sample string 2",
          "description": "sample string 3"
        },
        {
          "reference": "sample string 1",
          "name": "sample string 2",
          "description": "sample string 3"
        }
      ],
      "couponCodes": [
        "sample string 1",
        "sample string 2",
        "sample string 3"
      ],
      "earningSettings": {
        "earningSchedules": [
          {
            "scheduledType": "sample string 1",
            "scheduledInterval": "sample string 2",
            "numberOfIntervals": 1,
            "scheduledAmount": 1.0,
            "reference": "sample string 3"
          },
          {
            "scheduledType": "sample string 1",
            "scheduledInterval": "sample string 2",
            "numberOfIntervals": 1,
            "scheduledAmount": 1.0,
            "reference": "sample string 3"
          },
          {
            "scheduledType": "sample string 1",
            "scheduledInterval": "sample string 2",
            "numberOfIntervals": 1,
            "scheduledAmount": 1.0,
            "reference": "sample string 3"
          }
        ],
        "earningInterval": "sample string 1",
        "earningNumberOfIntervals": 1,
        "earningTimingInterval": "sample string 2",
        "earningTimingType": "sample string 3"
      },
      "netsuiteClassId": "sample string 6",
      "netsuiteLocationId": "sample string 7",
      "targetOrderQuantity": 1.0,
      "netsuiteBinId": "sample string 8",
      "invoiceOwner": "sample string 9",
      "skipCouponValidation": true,
      "hubspotDealId": 11,
      "quickBooksClassId": "sample string 12"
    },
    {
      "productId": 1,
      "quantity": 1.0,
      "name": "sample string 2",
      "description": "sample string 3",
      "overridePriceRanges": [
        {
          "min": 1.0,
          "max": 1.0,
          "amount": 2.0
        },
        {
          "min": 1.0,
          "max": 1.0,
          "amount": 2.0
        },
        {
          "min": 1.0,
          "max": 1.0,
          "amount": 2.0
        }
      ],
      "pricingModelType": "sample string 4",
      "pricingFormulaType": "sample string 5",
      "customFields": [
        {
          "key": "sample string 1",
          "value": {}
        },
        {
          "key": "sample string 1",
          "value": {}
        },
        {
          "key": "sample string 1",
          "value": {}
        }
      ],
      "discounts": [
        {
          "discountType": "sample string 1",
          "amount": 2.0
        },
        {
          "discountType": "sample string 1",
          "amount": 2.0
        },
        {
          "discountType": "sample string 1",
          "amount": 2.0
        }
      ],
      "productItems": [
        {
          "reference": "sample string 1",
          "name": "sample string 2",
          "description": "sample string 3"
        },
        {
          "reference": "sample string 1",
          "name": "sample string 2",
          "description": "sample string 3"
        },
        {
          "reference": "sample string 1",
          "name": "sample string 2",
          "description": "sample string 3"
        }
      ],
      "couponCodes": [
        "sample string 1",
        "sample string 2",
        "sample string 3"
      ],
      "earningSettings": {
        "earningSchedules": [
          {
            "scheduledType": "sample string 1",
            "scheduledInterval": "sample string 2",
            "numberOfIntervals": 1,
            "scheduledAmount": 1.0,
            "reference": "sample string 3"
          },
          {
            "scheduledType": "sample string 1",
            "scheduledInterval": "sample string 2",
            "numberOfIntervals": 1,
            "scheduledAmount": 1.0,
            "reference": "sample string 3"
          },
          {
            "scheduledType": "sample string 1",
            "scheduledInterval": "sample string 2",
            "numberOfIntervals": 1,
            "scheduledAmount": 1.0,
            "reference": "sample string 3"
          }
        ],
        "earningInterval": "sample string 1",
        "earningNumberOfIntervals": 1,
        "earningTimingInterval": "sample string 2",
        "earningTimingType": "sample string 3"
      },
      "netsuiteClassId": "sample string 6",
      "netsuiteLocationId": "sample string 7",
      "targetOrderQuantity": 1.0,
      "netsuiteBinId": "sample string 8",
      "invoiceOwner": "sample string 9",
      "skipCouponValidation": true,
      "hubspotDealId": 11,
      "quickBooksClassId": "sample string 12"
    }
  ],
  "invoiceCollectOptions": {
    "paymentMethod": 0,
    "paymentMethodId": 1,
    "useAnyAvailableFundsFirst": true,
    "rollbackOnFailedPayment": true
  },
  "view": "sample string 3"
}

application/xml, text/xml

Sample:
Click to beautify!
<BulkPurchase xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Common.Dto.Post">
  <AutoPurchase>true</AutoPurchase>
  <CustomerId>1</CustomerId>
  <InvoiceCollectOptions>
    <PaymentMethod>UseDefaultPaymentMethod</PaymentMethod>
    <PaymentMethodId>1</PaymentMethodId>
    <RollbackOnFailedPayment>true</RollbackOnFailedPayment>
    <UseAnyAvailableFundsFirst>true</UseAnyAvailableFundsFirst>
  </InvoiceCollectOptions>
  <Purchases>
    <BasePurchase>
      <CouponCodes xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
        <d4p1:string>sample string 3</d4p1:string>
      </CouponCodes>
      <CustomFields>
        <PurchaseCustomField>
          <Key>sample string 1</Key>
          <Value />
        </PurchaseCustomField>
        <PurchaseCustomField>
          <Key>sample string 1</Key>
          <Value />
        </PurchaseCustomField>
        <PurchaseCustomField>
          <Key>sample string 1</Key>
          <Value />
        </PurchaseCustomField>
      </CustomFields>
      <Description>sample string 3</Description>
      <Discounts>
        <BasePurchaseDiscount>
          <Amount>2</Amount>
          <DiscountType>sample string 1</DiscountType>
        </BasePurchaseDiscount>
        <BasePurchaseDiscount>
          <Amount>2</Amount>
          <DiscountType>sample string 1</DiscountType>
        </BasePurchaseDiscount>
        <BasePurchaseDiscount>
          <Amount>2</Amount>
          <DiscountType>sample string 1</DiscountType>
        </BasePurchaseDiscount>
      </Discounts>
      <EarningSettings>
        <EarningInterval xmlns="http://schemas.datacontract.org/2004/07/Common.Dto.Interfaces">sample string 1</EarningInterval>
        <EarningNumberOfIntervals xmlns="http://schemas.datacontract.org/2004/07/Common.Dto.Interfaces">1</EarningNumberOfIntervals>
        <EarningTimingInterval xmlns="http://schemas.datacontract.org/2004/07/Common.Dto.Interfaces">sample string 2</EarningTimingInterval>
        <EarningTimingType xmlns="http://schemas.datacontract.org/2004/07/Common.Dto.Interfaces">sample string 3</EarningTimingType>
        <EarningSchedules>
          <IntervalEarningSchedule>
            <NumberOfIntervals>1</NumberOfIntervals>
            <Reference>sample string 3</Reference>
            <ScheduledAmount>1</ScheduledAmount>
            <ScheduledInterval>sample string 2</ScheduledInterval>
            <ScheduledType>sample string 1</ScheduledType>
          </IntervalEarningSchedule>
          <IntervalEarningSchedule>
            <NumberOfIntervals>1</NumberOfIntervals>
            <Reference>sample string 3</Reference>
            <ScheduledAmount>1</ScheduledAmount>
            <ScheduledInterval>sample string 2</ScheduledInterval>
            <ScheduledType>sample string 1</ScheduledType>
          </IntervalEarningSchedule>
          <IntervalEarningSchedule>
            <NumberOfIntervals>1</NumberOfIntervals>
            <Reference>sample string 3</Reference>
            <ScheduledAmount>1</ScheduledAmount>
            <ScheduledInterval>sample string 2</ScheduledInterval>
            <ScheduledType>sample string 1</ScheduledType>
          </IntervalEarningSchedule>
        </EarningSchedules>
      </EarningSettings>
      <HubspotDealId>11</HubspotDealId>
      <InvoiceOwner>sample string 9</InvoiceOwner>
      <Name>sample string 2</Name>
      <NetsuiteBinId>sample string 8</NetsuiteBinId>
      <NetsuiteClassId>sample string 6</NetsuiteClassId>
      <NetsuiteLocationId>sample string 7</NetsuiteLocationId>
      <OverridePriceRanges>
        <PurchasePriceRange>
          <Amount>2</Amount>
          <Max>1</Max>
          <Min>1</Min>
        </PurchasePriceRange>
        <PurchasePriceRange>
          <Amount>2</Amount>
          <Max>1</Max>
          <Min>1</Min>
        </PurchasePriceRange>
        <PurchasePriceRange>
          <Amount>2</Amount>
          <Max>1</Max>
          <Min>1</Min>
        </PurchasePriceRange>
      </OverridePriceRanges>
      <OverridePricingModelType>sample string 4</OverridePricingModelType>
      <PricingFormulaType>sample string 5</PricingFormulaType>
      <ProductId>1</ProductId>
      <ProductItems>
        <BasePurchaseProductItem>
          <Description>sample string 3</Description>
          <Name>sample string 2</Name>
          <Reference>sample string 1</Reference>
        </BasePurchaseProductItem>
        <BasePurchaseProductItem>
          <Description>sample string 3</Description>
          <Name>sample string 2</Name>
          <Reference>sample string 1</Reference>
        </BasePurchaseProductItem>
        <BasePurchaseProductItem>
          <Description>sample string 3</Description>
          <Name>sample string 2</Name>
          <Reference>sample string 1</Reference>
        </BasePurchaseProductItem>
      </ProductItems>
      <Quantity>1</Quantity>
      <QuickBooksClassId>sample string 12</QuickBooksClassId>
      <SkipCouponValidation>true</SkipCouponValidation>
      <TargetOrderQuantity>1</TargetOrderQuantity>
    </BasePurchase>
    <BasePurchase>
      <CouponCodes xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
        <d4p1:string>sample string 3</d4p1:string>
      </CouponCodes>
      <CustomFields>
        <PurchaseCustomField>
          <Key>sample string 1</Key>
          <Value />
        </PurchaseCustomField>
        <PurchaseCustomField>
          <Key>sample string 1</Key>
          <Value />
        </PurchaseCustomField>
        <PurchaseCustomField>
          <Key>sample string 1</Key>
          <Value />
        </PurchaseCustomField>
      </CustomFields>
      <Description>sample string 3</Description>
      <Discounts>
        <BasePurchaseDiscount>
          <Amount>2</Amount>
          <DiscountType>sample string 1</DiscountType>
        </BasePurchaseDiscount>
        <BasePurchaseDiscount>
          <Amount>2</Amount>
          <DiscountType>sample string 1</DiscountType>
        </BasePurchaseDiscount>
        <BasePurchaseDiscount>
          <Amount>2</Amount>
          <DiscountType>sample string 1</DiscountType>
        </BasePurchaseDiscount>
      </Discounts>
      <EarningSettings>
        <EarningInterval xmlns="http://schemas.datacontract.org/2004/07/Common.Dto.Interfaces">sample string 1</EarningInterval>
        <EarningNumberOfIntervals xmlns="http://schemas.datacontract.org/2004/07/Common.Dto.Interfaces">1</EarningNumberOfIntervals>
        <EarningTimingInterval xmlns="http://schemas.datacontract.org/2004/07/Common.Dto.Interfaces">sample string 2</EarningTimingInterval>
        <EarningTimingType xmlns="http://schemas.datacontract.org/2004/07/Common.Dto.Interfaces">sample string 3</EarningTimingType>
        <EarningSchedules>
          <IntervalEarningSchedule>
            <NumberOfIntervals>1</NumberOfIntervals>
            <Reference>sample string 3</Reference>
            <ScheduledAmount>1</ScheduledAmount>
            <ScheduledInterval>sample string 2</ScheduledInterval>
            <ScheduledType>sample string 1</ScheduledType>
          </IntervalEarningSchedule>
          <IntervalEarningSchedule>
            <NumberOfIntervals>1</NumberOfIntervals>
            <Reference>sample string 3</Reference>
            <ScheduledAmount>1</ScheduledAmount>
            <ScheduledInterval>sample string 2</ScheduledInterval>
            <ScheduledType>sample string 1</ScheduledType>
          </IntervalEarningSchedule>
          <IntervalEarningSchedule>
            <NumberOfIntervals>1</NumberOfIntervals>
            <Reference>sample string 3</Reference>
            <ScheduledAmount>1</ScheduledAmount>
            <ScheduledInterval>sample string 2</ScheduledInterval>
            <ScheduledType>sample string 1</ScheduledType>
          </IntervalEarningSchedule>
        </EarningSchedules>
      </EarningSettings>
      <HubspotDealId>11</HubspotDealId>
      <InvoiceOwner>sample string 9</InvoiceOwner>
      <Name>sample string 2</Name>
      <NetsuiteBinId>sample string 8</NetsuiteBinId>
      <NetsuiteClassId>sample string 6</NetsuiteClassId>
      <NetsuiteLocationId>sample string 7</NetsuiteLocationId>
      <OverridePriceRanges>
        <PurchasePriceRange>
          <Amount>2</Amount>
          <Max>1</Max>
          <Min>1</Min>
        </PurchasePriceRange>
        <PurchasePriceRange>
          <Amount>2</Amount>
          <Max>1</Max>
          <Min>1</Min>
        </PurchasePriceRange>
        <PurchasePriceRange>
          <Amount>2</Amount>
          <Max>1</Max>
          <Min>1</Min>
        </PurchasePriceRange>
      </OverridePriceRanges>
      <OverridePricingModelType>sample string 4</OverridePricingModelType>
      <PricingFormulaType>sample string 5</PricingFormulaType>
      <ProductId>1</ProductId>
      <ProductItems>
        <BasePurchaseProductItem>
          <Description>sample string 3</Description>
          <Name>sample string 2</Name>
          <Reference>sample string 1</Reference>
        </BasePurchaseProductItem>
        <BasePurchaseProductItem>
          <Description>sample string 3</Description>
          <Name>sample string 2</Name>
          <Reference>sample string 1</Reference>
        </BasePurchaseProductItem>
        <BasePurchaseProductItem>
          <Description>sample string 3</Description>
          <Name>sample string 2</Name>
          <Reference>sample string 1</Reference>
        </BasePurchaseProductItem>
      </ProductItems>
      <Quantity>1</Quantity>
      <QuickBooksClassId>sample string 12</QuickBooksClassId>
      <SkipCouponValidation>true</SkipCouponValidation>
      <TargetOrderQuantity>1</TargetOrderQuantity>
    </BasePurchase>
    <BasePurchase>
      <CouponCodes xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
        <d4p1:string>sample string 3</d4p1:string>
      </CouponCodes>
      <CustomFields>
        <PurchaseCustomField>
          <Key>sample string 1</Key>
          <Value />
        </PurchaseCustomField>
        <PurchaseCustomField>
          <Key>sample string 1</Key>
          <Value />
        </PurchaseCustomField>
        <PurchaseCustomField>
          <Key>sample string 1</Key>
          <Value />
        </PurchaseCustomField>
      </CustomFields>
      <Description>sample string 3</Description>
      <Discounts>
        <BasePurchaseDiscount>
          <Amount>2</Amount>
          <DiscountType>sample string 1</DiscountType>
        </BasePurchaseDiscount>
        <BasePurchaseDiscount>
          <Amount>2</Amount>
          <DiscountType>sample string 1</DiscountType>
        </BasePurchaseDiscount>
        <BasePurchaseDiscount>
          <Amount>2</Amount>
          <DiscountType>sample string 1</DiscountType>
        </BasePurchaseDiscount>
      </Discounts>
      <EarningSettings>
        <EarningInterval xmlns="http://schemas.datacontract.org/2004/07/Common.Dto.Interfaces">sample string 1</EarningInterval>
        <EarningNumberOfIntervals xmlns="http://schemas.datacontract.org/2004/07/Common.Dto.Interfaces">1</EarningNumberOfIntervals>
        <EarningTimingInterval xmlns="http://schemas.datacontract.org/2004/07/Common.Dto.Interfaces">sample string 2</EarningTimingInterval>
        <EarningTimingType xmlns="http://schemas.datacontract.org/2004/07/Common.Dto.Interfaces">sample string 3</EarningTimingType>
        <EarningSchedules>
          <IntervalEarningSchedule>
            <NumberOfIntervals>1</NumberOfIntervals>
            <Reference>sample string 3</Reference>
            <ScheduledAmount>1</ScheduledAmount>
            <ScheduledInterval>sample string 2</ScheduledInterval>
            <ScheduledType>sample string 1</ScheduledType>
          </IntervalEarningSchedule>
          <IntervalEarningSchedule>
            <NumberOfIntervals>1</NumberOfIntervals>
            <Reference>sample string 3</Reference>
            <ScheduledAmount>1</ScheduledAmount>
            <ScheduledInterval>sample string 2</ScheduledInterval>
            <ScheduledType>sample string 1</ScheduledType>
          </IntervalEarningSchedule>
          <IntervalEarningSchedule>
            <NumberOfIntervals>1</NumberOfIntervals>
            <Reference>sample string 3</Reference>
            <ScheduledAmount>1</ScheduledAmount>
            <ScheduledInterval>sample string 2</ScheduledInterval>
            <ScheduledType>sample string 1</ScheduledType>
          </IntervalEarningSchedule>
        </EarningSchedules>
      </EarningSettings>
      <HubspotDealId>11</HubspotDealId>
      <InvoiceOwner>sample string 9</InvoiceOwner>
      <Name>sample string 2</Name>
      <NetsuiteBinId>sample string 8</NetsuiteBinId>
      <NetsuiteClassId>sample string 6</NetsuiteClassId>
      <NetsuiteLocationId>sample string 7</NetsuiteLocationId>
      <OverridePriceRanges>
        <PurchasePriceRange>
          <Amount>2</Amount>
          <Max>1</Max>
          <Min>1</Min>
        </PurchasePriceRange>
        <PurchasePriceRange>
          <Amount>2</Amount>
          <Max>1</Max>
          <Min>1</Min>
        </PurchasePriceRange>
        <PurchasePriceRange>
          <Amount>2</Amount>
          <Max>1</Max>
          <Min>1</Min>
        </PurchasePriceRange>
      </OverridePriceRanges>
      <OverridePricingModelType>sample string 4</OverridePricingModelType>
      <PricingFormulaType>sample string 5</PricingFormulaType>
      <ProductId>1</ProductId>
      <ProductItems>
        <BasePurchaseProductItem>
          <Description>sample string 3</Description>
          <Name>sample string 2</Name>
          <Reference>sample string 1</Reference>
        </BasePurchaseProductItem>
        <BasePurchaseProductItem>
          <Description>sample string 3</Description>
          <Name>sample string 2</Name>
          <Reference>sample string 1</Reference>
        </BasePurchaseProductItem>
        <BasePurchaseProductItem>
          <Description>sample string 3</Description>
          <Name>sample string 2</Name>
          <Reference>sample string 1</Reference>
        </BasePurchaseProductItem>
      </ProductItems>
      <Quantity>1</Quantity>
      <QuickBooksClassId>sample string 12</QuickBooksClassId>
      <SkipCouponValidation>true</SkipCouponValidation>
      <TargetOrderQuantity>1</TargetOrderQuantity>
    </BasePurchase>
  </Purchases>
  <View>sample string 3</View>
</BulkPurchase>

application/x-www-form-urlencoded

Sample:
Click to beautify!

Sample not available.

Response Information

Response body formats

application/json, text/json

Sample:
Click to beautify!
{
  "customerId": 1,
  "purchases": null,
  "sideEffects": {}
}

application/xml

Sample:
Click to beautify!

Sample not available.

text/xml

Sample:
Click to beautify!

Sample not available.