BMSetInventory API Operation (SOAP)

API

Last updated: Aug 15th, 5:56am

Sets the inventory level and inventory management features for a button PayPal can track inventory, calculate the gross profit associated with sales, send you an alert when inventory drops below a specified quantity, and manage sold out conditions.

BMSetInventory request

The request specifies inventory values related to a hosted button as well as inventory values that are specific to each menu item.

BMSetInventory request parameters

Field

Description

HostedButtonID

xs:string

(Required) The ID of the hosted button whose inventory you want to set.

TrackInv

xs:string

(Required) Whether to track inventory levels associated with the button. Value is:

  • 0. Do not track inventory

  • 1. Track inventory.

TrackPnl

xs:string

(Required) Whether to track the gross profit associated with inventory changes. Value is:

  • 0. Do not track the gross profit

  • 1. Track the gross profit.

ItemTrackingDetails

ebl:ItemTrackingDetails

(Optional) Item tracking details for the button.

OptionIndex

xs:string

(Optional) Option index, which identifies the button. Option index 0 is the menu that contains the price if one exists; otherwise, it is the first menu without a price.

Character length and limitations: One single-byte alphanumeric character.

SoldoutURL

xs:string

(Optional) The URL to which the buyer's browser is redirected when the inventory drops to 0.

Character length and limitations: 127 single-byte alphanumeric characters.

OptionTrackingDetails

ebl:OptionTrackingDetails

(Optional) Option tracking details for menu items associated with the button.

ReuseDigitalDownloadKeys

xs:string

(Optional) Whether to reuse download keys:

  • 0. Do not reuse keys. The default.

  • 1. Reuse keys.

AppendDigitalDownloadKeys

xs:string

(Optional) Whether to append download keys:

  • 0. Do not append keys. The default.

  • 1. Append keys.

DigitalDownloadKeys

xs:string

(Conditional) One or more digital download keys, up to a maximum of 1,000 keys. This field is required if ReuseDigitalDownloadKeys and AppendDigitalDownloadKeys are set to 1.

Character length and limitations: 1,000 single-byte alphanumeric characters each.

Item tracking details fields

ItemNumber

xs:string

(Optional) The ID for an item associated with this button.

ItemQty

xs:string

The quantity of the item associated with this button. Specify either the absolute quantity in this field or the change in quantity in the quantity delta field.

ItemQtyDelta

xs:string

The change in quantity you want to specify for the item associated with this button. Specify either the change in quantity in this field or the absolute quantity in the item quantity field.

ItemAlert

xs:string

(Optional) The quantity of the item associated with this button below which PayPal sends you an email notification.

ItemCost

xs:string

(Optional) The cost of the item associated with this button.

Option tracking details fields

OptionNumber

xs:string

(Optional) The menu item's ID for an option in a drop-down menu.

OptionQty

xs:string

The quantity you want to specify for the option associated with this menu item. Specify either the absolute quantity in this field or the change in quantity in the quantity delta field.

OptionSelect

xs:string

(Optional) The menu item's name in a drop-down menu.

OptionQtyDelta

xs:string

The change in quantity you want to specify for the option associated with this menu item. Specify either the change in quantity in this field or the absolute quantity in the quantity field.

OptionAlert

xs:string

(Optional) The quantity of the option associated with this menu item below which PayPal sends you an email notification.

OptionCost

xs:string

(Optional) The cost of the option associated with this menu item

Character length and limitations: Value must be a positive number, with no currency symbol. It must have two decimal places and the decimal separator must be a period (.). It may have an optional comma (,) for the thousands separator.

BMSetInventory response

The response contains only the transaction ID.

BMSetInventory response fields

Field

Description

TransactionID

xs:string

Transaction ID

BMSetInventory errors

Error codeShort and long messagesUser action
10001Internal Error
Internal Error
To learn more about possible causes and corrective actions, see What is API error code 10001?.
11950Invalid Data
A hosted button ID must be specified.
11951Invalid Argument
The hosted button ID specified is invalid.
11951Invalid Argument
The hosted button ID specified is invalid.
11953Invalid Data
You can only track inventory and profit & loss for buy now, cart or subscription buttons.
11954Invalid Data
A TrackInv value must be specified.
11955Invalid Data
A TrackPnl value must be specified.
11956Invalid Argument
The TrackInv value specified is invalid.
11957Invalid Argument
The TrackPnl value specified is invalid.
11958Invalid Data
You cannot specify both an ItemQty and ItemQtyDelta value.
11959Invalid Data
You cannot specify both an OptionQty and OptionQtyDelta value.
11960Invalid Data
You cannot specify item level or option level inventory when TrackInv is 0.
11961Invalid Data
You must either track inventory by item or by option when TrackInv is 1. It cannot be tracked by both together or none at all.
11964Invalid Data
You must either track inventory and/or track profit & loss.
11965Invalid Data
You cannot track inventory by item and cost by option at the same time or vice versa.
11966Invalid Argument
Item number specified is invalid. It must be a string less than 127 characters.
11967Invalid Data
You cannot set inventory for more option selections than the number of option selections saved in the button.
11968Invalid Data
Option numbers must be unique within an individual button.
11969Invalid Data
An option name index value must be specified when tracking inventory or profit & loss by option.
11970Invalid Argument
Option name index value specified is invalid.
11971Invalid Data
Inventory and/or profit & loss must be managed by item or an option with price when one is defined.
11972Invalid Data
Option name index value specified does not exist.
11973Invalid Data
ItemQty and/or ItemQtyDelta must be an integer.
11974Invalid Data
An item quantity or item quantity delta value cannot be specified when TrackInv is 0.
11975Invalid Data
The number of option quantity or option quantity delta values specified is greater than the number of option selections in the saved button.
11976Invalid Data
You must specify either option quantity or option quantity delta values with a valid integer value.
11977Invalid Data
An option quantity or option quantity delta value must not be specified when TrackInv is 0.
11978Invalid Argument
Item alert must be specified as a positive integer.
11979Invalid Argument
Item alert must not be specified when TrackInv is 0.
11980Invalid Data
The number of option alert values specified is greater than the number of option selections in the saved button.
11981Invalid Argument
Option alert values must be specified as a positive integer.
11982Invalid Argument
Option alert values cannot be specified when TrackInv is 0.
11983Invalid Argument
Item cost value must be specified when tracking profit & loss by item.
11984Invalid Argument
The item cost value specified is invalid.
11985Invalid Argument
An item cost value cannot be specified when TrackPnl is 0.
11986Invalid Data
The number of option cost values specified is greater than the number of option selections in the saved button.
11987Invalid Argument
Option cost values must be specified when tracking profit & loss by option.
11988Invalid Argument
An option cost value specified is invalid.
11989Invalid Argument
An option cost value cannot be specified when TrackPnl is 0.
11990Invalid Argument
The sold out URL specified is invalid.

12210

Invalid Argument
The currency code value specified is invalid.

We use cookies to improve your experience on our site. May we use marketing cookies to show you personalized ads? Manage all cookies