completeSale

completeSale allows feedback and tracking information to be left following a completed Bonanza order.

completeSale Input

completeSale is a secure API method with the following URL and HTTP header requirements:

Submit to URL: https://api.bonanza.com/api_requests/secure_request
Required in HTTP header: X-BONANZLE-API-DEV-NAME set to your dev_id
  X-BONANZLE-API-CERT-NAME set to your cert_id

Note that all secure methods except for fetchToken and getBoothItems require you to submit a user token so that we know what user account you are acting on behalf of.  For details about setting up and submitting user tokens, see our intro to user tokens.

The name for your request should be completeSaleRequest.

Here are the available input parameters that can be serialized into JSON:

Argument Type Occurrence Meaning
requesterCredentials Container Required Container for user credentials
requesterCredentials .bonanzleAuthToken string Required The verified user token for the user who you are acting on behalf of.
accept boolean Optional When true, will accept the pending offer (if possible).
deny boolean Optional When true, will deny the pending offer (if possible).
feedbackInfo container optional Details about feedback being left.
feedbackInfo.commentText string Optional (required if leaving feedback) Up to 250 characters that serve as the comment for the feedback.
feedbackInfo.commentTypeCode string Optional (required if leaving feedback) A string describing the type of feedback. Possible values:
  • positive
  • negative
  • neutral
feedbackInfo.targetUser string Optional (required if leaving feedback) User name or ID of the user who the feedback is being left for
shipment Container Optional Details about order's shipping status
shipment.notes string Optional Message for buyer about shipping
shipment.privateNote string Optional Seller's private note to themselves
shipment.shippingTrackingNumber string Optional The tracking number for the shipment
shipment.shippingCarrierUsed string Optional The carrier used for shipping. Possible values:
  • usps
  • ups
  • fedex
  • other
shipped boolean Optional Whether or not the order has shipped
transactionID integer Required The ID for the transaction we're dealing with. The same as orderID

completeSale Output

The name for the output returned from this request is completeSaleResponse. So, after parsing the serialized response into JSON, you can access the data with something like my_json_hash['completeSaleResponse']

Here are all the possible output parameters:

Argument Type Occurrence Meaning
Standard Output Fields
errorMessage Container Conditionally Description of an error or warning that occurred when Bonanza processed the request. Not returned if the ack value is Success.
errorMessage.error Container Conditionally,
repeatable: [0..*]
errorMessage.error.category ErrorCategory Conditionally Currently unused.
errorMessage.error.message string Conditionally A description of the error
errorMessage.error.type ErrorType Conditionally A unique descriptive name for the error.
warnings Container Conditionally Description of a warning that occurred when Bonanza processed the request.
warnings.unrecognized_parameters Container Conditionally,
repeatable: [0..*]
An array of unrecognized parameters.
Call-specific Output Fields
skippedProcessing boolean Always True if the offer acceptance was not issued concurrently with another offer acceptance request. False otherwise.
processedAcceptance boolean Sometimes Returns true if the offer was accepted successfully. Absent otherwise.
processedDeny boolean Sometimes Returns true if the offer was denied successfully. Absent otherwise.