BMGetInventory API Operation (SOAP)
Last updated: Aug 15th, 7:53am
Shows the inventory levels and other inventory-related information for a button and menu items associated with the button.
Typically, you call BMGetInventory
to obtain field values before calling BMSetInventory
to change the inventory levels.
BMGetInventory request
The hosted button ID identifies the button for which to track inventory.
BMGetInventory request parameters
Field | Description |
---|---|
| (Required) The ID of the hosted button whose inventory information you want to obtain. |
| (Optional) One or more digital download keys, up to a maximum of 1,000 keys. Character length and limitations: 1,000 single-byte alphanumeric characters each. |
BMGetInventory response
The response fields contain inventory information related to the button.
BMGetInventory response fields
Field | Description |
---|---|
| The ID of the hosted button whose inventory you want to set. |
| Whether to track inventory levels associated with the button. Value is:
|
| Whether to track the gross profit associated with inventory changes. Value is:
|
Item tracking details for the button. | |
| 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. |
Option tracking details for menu items associated with the button. | |
| 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 |
Item tracking details fields
| The ID for an item associated with this button |
| The current inventory level of the item associated with this button |
| Not used |
| The quantity of the item associated with this button below which PayPal sends you an email notification |
| The cost of the item associated with this button |
Option tracking details fields
| The menu item's ID for an option in a drop-down menu |
| The current inventory level of the option associated with this menu item |
| The menu item's name in a drop-down menu |
| Not used |
| The quantity of the option associated with this menu item below which PayPal sends you an email notification |
| The cost of the option associated with this menu item |
BMGetInventory errors
Error code | Short and long messages | User action |
---|---|---|
10001 | Internal Error Internal Error | To learn more about possible causes and corrective actions, see What is API error code 10001?. |
11950 | Invalid Data A hosted button ID must be specified. | |
11951 | Invalid Argument The hosted button ID specified is invalid. | |
11953 | Invalid Data You can only track inventory and profit & loss for buy now, cart or subscription buttons. | |
11991 | Invalid Data The hosted button id specified does not have any inventory or cost associated with it. | |
11992 | Invalid Argument You do not have permissions to access this button. Please check the hosted button ID and try again. |