Models
33 min
this page documents every object used by the refundid webhooks (merchant provided apis called by refundid) and the refundid provided apis (called by the merchant) all datetimes are iso 8601 strings, and all monetary values use the rapiamount docid 7v4lpzpqkdk4vhvy8kcu3 object order rapiorder response for the "get /order" webhook merchant order ref str the e commerce platform's unique id for the order order number str the customer facing order number (e g "#10245") email str the customer's email purchased at datetime fulfilled at datetime (optional) when the order was fulfilled/shipped payment method str e g "afterpay", "visa" is giftcard used bool whether a gift card was used to (partly) pay for the order delivery info rapideliveryinfo docid 7v4lpzpqkdk4vhvy8kcu3 (optional) line items list of rapiorderlineitem docid 7v4lpzpqkdk4vhvy8kcu3 metafields list of rapimetafield docid 7v4lpzpqkdk4vhvy8kcu3 (optional, defaults to an empty list) arbitrary merchant defined key/value pairs attached to the order rapiorderlineitem line item for the "get /order" webhook line item ref str the e commerce platform's unique id for the line item title str variant str (optional) price rapiamount docid 7v4lpzpqkdk4vhvy8kcu3 the unit price tax detail rapilineitemtaxdetail docid 7v4lpzpqkdk4vhvy8kcu3 (optional) quantity int the quantity purchased returnable quantity int the quantity still returnable (excluding quantities already refunded or returned by other means) discount rapiamount docid 7v4lpzpqkdk4vhvy8kcu3 (optional) image url str weight in kilograms float product ref str the platform's product id variant ref str (optional) the platform's variant id sku str (optional) categories list of str used to evaluate category based return rules non returnable reasons list of str merchant side reasons this item cannot be returned; an empty list means the item is returnable rapideliveryinfo delivery address and tracking label address rapiaddress docid 7v4lpzpqkdk4vhvy8kcu3 tracking rapitracking docid 7v4lpzpqkdk4vhvy8kcu3 rapimetafield a typed key/value pair the value type discriminates the type of value value type one of string , integer , float , boolean key str value str | int | float | bool (matching value type ) return rapireturn response for the "get /return" webhook (merchant initiated rma flow) merchant rma ref str the merchant generated unique rma id created at datetime line items list of rapireturnlineitem docid 7v4lpzpqkdk4vhvy8kcu3 return shipping rapireturnshipping docid 7v4lpzpqkdk4vhvy8kcu3 (optional) rapireturnlineitem line item for the "get /return" webhook merchant order ref str line item ref str quantity int return reason str child return reason str (optional) adjustments list of rapireturnadjustment docid 7v4lpzpqkdk4vhvy8kcu3 positive or negative amounts applied on top of the item value compensation method rapicompensationmethod docid 7v4lpzpqkdk4vhvy8kcu3 rapireturnshipping return shipping specification from address rapiaddress docid 7v4lpzpqkdk4vhvy8kcu3 (optional) to address rapiaddress docid 7v4lpzpqkdk4vhvy8kcu3 (optional) tracking rapitracking docid 7v4lpzpqkdk4vhvy8kcu3 (optional) deductions rapiamount docid 7v4lpzpqkdk4vhvy8kcu3 (optional) an amount to deduct from the refund for shipping rapireturnadjustment adjustment for the "get /return" webhook adjustment rapiamount docid 7v4lpzpqkdk4vhvy8kcu3 positive (bonus) or negative (fee) description str (optional) e g "loyalty bonus", "missing packaging fee" rapicompensationmethod compensation method for the "get /return" webhook values refund , exchange , credit instant return (refundid order) rapirefundidorder body of the "post /refundid" webhook, and the shape of instant returns in the "get /v1/merchant/returns" api response refundid id str the numeric id of the instant return, as a string use this value when calling the tracking, close refunds, note and flag apis rma ref str the refundid rma reference shown in the merchant portal (e g "rma20871") order number str the order number of the returned order created at datetime when the return was submitted by the customer (utc) merchant rma ref str (optional) the merchant generated rma reference, if one was supplied status rapirefundidorderstatus docid 7v4lpzpqkdk4vhvy8kcu3 is flagged bool whether the return is currently flagged in the merchant portal line items list of rapirefundidorderlineitem docid 7v4lpzpqkdk4vhvy8kcu3 refund breakdown rapirefundidbreakdown docid 7v4lpzpqkdk4vhvy8kcu3 the amount instantly refunded to the customer shipping label rapishippinglabel docid 7v4lpzpqkdk4vhvy8kcu3 (optional) reconciliation breakdown rapireconciliationbreakdown docid 7v4lpzpqkdk4vhvy8kcu3 (optional) populated once the return is closed customer rapicustomer docid 7v4lpzpqkdk4vhvy8kcu3 rapirefundidorderstatus the event which triggered the "post /refundid" webhook values refunding , refundid , closed , failed (see the webhooks page for what each status means) rapirefundidorderlineitem a line item of an instant or standard return merchant order ref str the e commerce platform's order id line item ref str the e commerce platform's line item id quantity int the quantity being returned on this line price rapiamount docid 7v4lpzpqkdk4vhvy8kcu3 the unit price of the item tax detail rapilineitemtaxdetail docid 7v4lpzpqkdk4vhvy8kcu3 return reason str child return reason str (optional) return reason notes list of rapireturnreasonnote docid 7v4lpzpqkdk4vhvy8kcu3 sku str (optional) product ref str (optional) the platform's product id variant ref str (optional) the platform's variant id barcode str (optional) resolution rapirefundidresolution docid 7v4lpzpqkdk4vhvy8kcu3 (optional) the per item resolution applied when the return was closed; null while the return is open restock bool (default false) whether the item was flagged for restocking when it was closed notes str (optional) merchant notes recorded against the item when it was closed title str variant str (optional) image url str (optional) rapireturnreasonnote extra information the customer supplied for their return reason title str the question the customer was asked value str the customer's answer, or an image url for image notes type one of text , image , choice rapirefundidbreakdown breakdown of a refund amount subtotal rapiamount docid 7v4lpzpqkdk4vhvy8kcu3 the value of the returned items store return fee rapiamount docid 7v4lpzpqkdk4vhvy8kcu3 any return fee charged to the customer customer shipping cost rapiamount docid 7v4lpzpqkdk4vhvy8kcu3 return shipping charged to the customer total rapiamount docid 7v4lpzpqkdk4vhvy8kcu3 the net amount owed to the customer rapireconciliationbreakdown breakdown of the reconciliation created when an instant return is closed i e who pays for the refunded items amount to reconcile from merchant float item value owed by the merchant discounted amount to reconcile from merchant float the same, with discounts applied shipping to reconcile from merchant float shipping owed by the merchant merchant advance adjustment float any adjustment to the merchant funded advance refundid cut float refundid's fee discounted refundid cut float refundid's fee, with discounts applied invoice created at datetime (optional) when the reconciliation was invoiced; null if not yet invoiced closed by merchant or refundid closed on datetime rapirefundidresolution a resolution code used in rapirefundidorderlineitem and the "post /close refunds" api codes are matched case insensitively values merchants can send via "post /close refunds" accept accept the item reject used item reject due to the item being used reject sale item reject an item that was on sale reject damaged item reject an item that arrived damaged reject empty package reject as the package was empty reject not received reject as the item was not received reject incorrect item reject an item that was incorrect reject no tracking reject due to lack of tracking reject dishonest reject due to dishonesty reject policy violation reject due to a policy violation reject other reason reject for other unspecified reasons cancelled by customer cancelled by the customer cancelled by merchant cancelled by the merchant values that may additionally appear in webhook payloads and "get /v1/merchant/returns" responses (set by refundid; not accepted from merchants) cancelled by refundid cancelled by refundid rejected by refundid item not shipped rejected by refundid because the item was not shipped rejected by refundid other reason rejected by refundid for another unspecified reason double refund the customer was refunded twice (e g once by refundid and once by another channel) note for instant returns, the specific cancel/reject code may alter fees charged to the customer for standard returns, any cancel code is treated as a standard cancel and any reject code as a standard reject rapicloselineitem per item resolution in the "post /close refunds" api request merchant order ref str line item ref str quantity int resolution rapirefundidresolution docid 7v4lpzpqkdk4vhvy8kcu3 restock bool notes str (optional) rapicloserefundidorder request model for closing an instant return via "post /close refunds" refundid id int the numeric id of the instant return merchant rma ref str (optional) line items list of rapicloselineitem docid 7v4lpzpqkdk4vhvy8kcu3 standard return rapistandardreturn body of the "post /standard return" webhook, and the shape of standard returns in the "get /v1/merchant/returns" api response standard return id str the numeric id of the standard return, as a string use this value when calling the tracking, close refunds, note and flag apis standard return encrypted id str an encrypted, hard to guess version of the same id, suitable for embedding in customer facing urls return resolution str the internal name of the resolution the customer selected (e g "store credit") status rapistandardreturnstatus docid 7v4lpzpqkdk4vhvy8kcu3 is flagged bool whether the return is currently flagged in the merchant portal requested refund breakdown rapirefundidbreakdown docid 7v4lpzpqkdk4vhvy8kcu3 the refund amount requested by the customer line items list of rapirefundidorderlineitem docid 7v4lpzpqkdk4vhvy8kcu3 rma ref str the refundid rma reference shown in the merchant portal order number str the order number of the returned order created at datetime when the return was submitted by the customer (utc) estimated order to store currency exchange rate rapicurrencyexchangerate docid 7v4lpzpqkdk4vhvy8kcu3 (optional) the estimated conversion rate used when the order currency differs from the store's base currency shipping label rapishippinglabel docid 7v4lpzpqkdk4vhvy8kcu3 (optional) close breakdown rapistandardreturnclosebreakdown docid 7v4lpzpqkdk4vhvy8kcu3 (optional) populated once the return is closed exchange rapiexchange docid 7v4lpzpqkdk4vhvy8kcu3 (optional) the exchange purchase request, when the return includes an exchange customer rapicustomer docid 7v4lpzpqkdk4vhvy8kcu3 rapistandardreturnstatus the possible statuses of a standard return values lodging the return is currently being lodged lodged the return has been successfully lodged closing the return process is in the closing stages closed the return process has been completed and closed failed the return could not be lodged this status is sent to additional notification webhook endpoints, not the primary rapi ecommerce endpoint rapistandardreturnclosebreakdown the final outcome of a closed standard return final refund amount rapiamount docid 7v4lpzpqkdk4vhvy8kcu3 the amount actually refunded outbound shipping refund amount rapiamount docid 7v4lpzpqkdk4vhvy8kcu3 (optional) the portion of final refund amount that reimbursed the original order's outbound shipping (not an additional amount) null for returns closed before this was tracked, or where the platform cannot source the original shipping amount; 0 where it was not reimbursed closed on datetime closed by merchant or refundid refunds list of rapistandardrefundclosebreakdownrefund docid 7v4lpzpqkdk4vhvy8kcu3 how the refund was paid out only non zero refunds are recorded rapistandardrefundclosebreakdownrefund refund method ref str an identifier for the refund method (e g gift card vs original payment) amount rapiamount docid 7v4lpzpqkdk4vhvy8kcu3 rapiclosestandardreturn request model for closing a standard return via "post /close refunds" standard return id int the numeric id of the standard return merchant rma ref str (optional) line items list of rapicloselineitem docid 7v4lpzpqkdk4vhvy8kcu3 must contain at least one entry reimburse outbound shipping bool (default false) when true, additionally refund the original order's outbound shipping to the customer (currently only supported where the platform can source the original shipping amount, e g shopify) rapicurrencyexchangerate from currency iso 4217 code to currency iso 4217 code exchange rate float tracking, notes and flags rapirefundidordertracking an item in the "post /v1/merchant/tracking" api request exactly one of refundid id or standard return id must be provided refundid id int (optional) the numeric id of an instant return standard return id int (optional) the numeric id of a standard return tracking rapitracking docid 7v4lpzpqkdk4vhvy8kcu3 rapireturnaddnote an item in the "post /v1/merchant/note" api request exactly one of refundid id or standard return id must be provided refundid id int (optional) standard return id int (optional) note str rapireturnflag an item in the "put /v1/merchant/flag" api request exactly one of refundid id or standard return id must be provided refundid id int (optional) standard return id int (optional) is flagged bool common rapiamount canonical monetary amount specification amount float currency iso 4217 code rapilineitemtaxdetail tax breakdown for a line item if no tax amount is provided, tax included must be true tax rapiamount docid 7v4lpzpqkdk4vhvy8kcu3 (optional) tax included bool whether the tax is already included in the item price rapiaddress canonical address specification address1 str address2 str (optional) city str zip str (optional) province str (optional) country str country code str (optional) iso 3166 1 alpha 2 code rapitracking tracking label, with carrier specification carrier str tracking number str status refundidtrackingstatus docid 7v4lpzpqkdk4vhvy8kcu3 (optional) status date datetime (optional) rapishippinglabel a shipping label attached to a refundid rma tracking rapitracking docid 7v4lpzpqkdk4vhvy8kcu3 purchase price rapiamount docid 7v4lpzpqkdk4vhvy8kcu3 (optional) what the label cost to purchase; null for merchant provided tracking customer price rapiamount docid 7v4lpzpqkdk4vhvy8kcu3 (optional) what the customer was charged for the label label url str (optional) a url to download the label pdf, when the label was generated through refundid refundidtrackingstatus the possible tracking statuses for shipments values not shipped yet the item has not been shipped yet transit the item is currently in transit delivered the item has been successfully delivered maybe delivered the carrier reported an ambiguous delivery event; treated as delivered for business purposes delivered to i w the item has been delivered to an international consolidation warehouse (cross border shipments only) returned via seko hub the item was routed back via a consolidation hub (cross border shipments only) failure there was a failure in delivering the item lost in transit the item has been in transit for long enough to be considered lost unknown the tracking status of the item is unknown rapicustomer email str the customer's email rapiexchangeitem a line item which has been requested to be purchased within a purchase request ( rapiexchange docid 7v4lpzpqkdk4vhvy8kcu3 ) item ref str the platform's id of the variant to purchase quantity int the quantity requested to be purchased of this item expected price rapiamount docid 7v4lpzpqkdk4vhvy8kcu3 the expected price of the line item in the exchange order title str variant str (optional) image url str (optional) sku str (optional) product ref str (optional) the platform's product id variant ref str (optional) the platform's variant id returned line item ref str (optional) the line item ref of the related rapirefundidorderlineitem docid 7v4lpzpqkdk4vhvy8kcu3 if this purchase request line item was directly exchanged for one of the returned items ("variant" exchanges) rapiexchangestatus the status of an exchange values ready the exchange is ready to be placed purchasing the exchange is in process of completing automated purchase purchased the exchange order is purchased voided the exchange order has been voided rapiexchange information about a purchase request for an exchange purchase request id int the id of the exchange request in refundid status rapiexchangestatus docid 7v4lpzpqkdk4vhvy8kcu3 the status of the exchange expected shipping price rapiamount docid 7v4lpzpqkdk4vhvy8kcu3 the expected price of the exchange order's outbound shipping purchase request total value rapiamount docid 7v4lpzpqkdk4vhvy8kcu3 the total value of the items requested in the exchange customer invoice amount rapiamount docid 7v4lpzpqkdk4vhvy8kcu3 any amount the customer paid extra for the exchange fname str the customer's first name lname str the customer's last name email str phone str shipping address rapiaddress docid 7v4lpzpqkdk4vhvy8kcu3 the shipping address for the exchange order line items list of rapiexchangeitem docid 7v4lpzpqkdk4vhvy8kcu3 draft order ref str (optional) the id of the draft order created in the ecommerce platform (if one was created) shipping rate ref str (optional) the expected reference for the outbound shipping rate shipping rate title str (optional) the expected title for the outbound shipping rate order name str (optional) the name of the created order in the ecommerce platform, if one was created can only be populated once the exchange is purchased order ref str (optional) the id of the created order in the ecommerce platform, if one was created can only be populated once the exchange is purchased shipping (label provider) models the following models are only used by the optional shipping webhooks, for merchants who act as their own shipping label provider (see the webhooks page) rapishippingparcel weight float weight unit one of kg , lb , oz , g length float width float height float dimension unit one of cm , in rapicontactdetails name str email str (optional) phone str (optional) rapishippingsettings is return bool whether this shipment is a return expected label purchase price currency iso 4217 code rapishippinglineitem an item contained in the parcel being shipped sent on all shipments, domestic and international merchant order ref str the id of the original order on your ecommerce platform line item ref str the id of the line item on the original order quantity int the quantity of this item in the parcel weight float (optional) per unit weight from your ecommerce platform's product data; null when the platform has no weight for the item note the parcel weight is always populated, falling back to configured defaults where product weights are unavailable weight unit one of kg , lb , oz , g (currently always kg ) title str variant str (optional) sku str (optional) product ref str (optional) the product id on the ecommerce platform variant ref str (optional) the variant id on the ecommerce platform barcode str (optional) rapishippingcustomsitem customs entry for an item in an international shipment quantity int value rapiamount docid 7v4lpzpqkdk4vhvy8kcu3 weight float weight unit one of kg , lb , oz , g description str return reason str (optional) sku str (optional) origin country iso country code hs tariff number str (optional) rapishippingcustomsdeclaration customs items list of rapishippingcustomsitem docid 7v4lpzpqkdk4vhvy8kcu3 contents explanation str customs certify bool customs signer str preferred incoterm str restriction type one of none , other , quarantine eel pfc code noeei 30 37 a contents type one of return , merchandise , gift non delivery option one of abandon , return what happens if the shipment cannot be delivered rapishippingratesrequest body of the "post /shipping rates" webhook from address rapiaddress docid 7v4lpzpqkdk4vhvy8kcu3 to address rapiaddress docid 7v4lpzpqkdk4vhvy8kcu3 sender details rapicontactdetails docid 7v4lpzpqkdk4vhvy8kcu3 (optional) recipient details rapicontactdetails docid 7v4lpzpqkdk4vhvy8kcu3 parcel rapishippingparcel docid 7v4lpzpqkdk4vhvy8kcu3 line items list of rapishippinglineitem docid 7v4lpzpqkdk4vhvy8kcu3 the items contained in the parcel customer reference str customs declaration rapishippingcustomsdeclaration docid 7v4lpzpqkdk4vhvy8kcu3 (optional) settings rapishippingsettings docid 7v4lpzpqkdk4vhvy8kcu3 shipper refs list of str the carrier account references to quote against rapishippingrate an entry in the "post /shipping rates" webhook response purchase price rapiamount docid 7v4lpzpqkdk4vhvy8kcu3 carrier str service type str shipper ref str the carrier account this rate belongs to rate id str (optional) identifier for this rate, echoed back on purchase shipment id str (optional) identifier for the quoted shipment, echoed back on purchase phone number required bool (default false) pickup object (optional) {instructions enabled bool, ranges \[{start datetime, end datetime}]} when pickup booking is supported rapipurchaseshippinglabelrequest body of the "post /shipping label" webhook same fields as rapishippingratesrequest docid 7v4lpzpqkdk4vhvy8kcu3 (with sender details required and no shipper refs ), plus carrier str service type str shipper ref str (optional) rate id str (optional) as returned by the rates webhook shipment id str (optional) as returned by the rates webhook pickup request object (optional) {range {start datetime, end datetime}, instructions str | null} rapipurchasedshippinglabelresult response of the "post /shipping label" webhook purchase price rapiamount docid 7v4lpzpqkdk4vhvy8kcu3 label id str your unique reference for the label; used for cancellation label object either {label b64 str} (base64 encoded pdf) or {label url str} (link to the pdf) tracking number str from location rapiaddress docid 7v4lpzpqkdk4vhvy8kcu3 to location rapiaddress docid 7v4lpzpqkdk4vhvy8kcu3 carrier str service type str pickup options object (optional) {pickup id str, range {start, end}, instructions str | null} when a pickup was booked commercial invoice url str (optional) from location timezone str (optional) iana timezone name barcode url str (optional) rapicancelshippinglabelrequest body of the "post /cancel shipping label" webhook label id str the label id returned when the label was purchased rapishippingtrackingstatusrequest an entry in the "post /shipping tracking status" webhook request body (a json array) tracking number str carrier str rapishippingtrackingstatusresponse an entry in the "post /shipping tracking status" webhook response (a json array) tracking number str status refundidtrackingstatus docid 7v4lpzpqkdk4vhvy8kcu3 status date datetime (optional) source status str (optional, max 64 chars) the raw carrier status source substatus str (optional, max 256 chars) source status details str (optional, max 1024 chars) datetime iso 8601 format