v1

latestOpenAPI 3.0.12026-07-243902.3 MB
Contracts

Update Contract

This endpoint updates a contract using the Contract ID. Information that can be updated for a contract includes coverage, customer, plan, and product details associated with the contract.

Given the new contract type of shipping protection, there are two different bodies that can be used to perform the contract update. When a shipping protection contract needs to be updated, the body will include tracking/shipment information and a list of products covered under the shipping protection plan instead of the one product that would be applicable with extended warranty contracts. Additional details on the various fields that can be updated are outlined in the options below.

put/contracts/{contractId}

Path parameters

contractIdstring uuid required
Example:cc957cb3-3d5d-430b-90a2-9ec96ee4c3cf

Unique identifier for Extend contract.

Headers

Content-Typestring required
Example:application/json

Used to indicate the original media type of the resource (prior to any content encoding applied for sending).

X-Extend-Access-Tokenstring required
Example:ExtendAccessToken

An Extend private API key used to authenticate requests.

Acceptstring required
Example:application/json; version=2022-02-01

Indicates which content types, expressed as MIME types, the client is able to understand, as well as identifies which API version to use in the request.

Request body

OR
OR

Example request

{
  "customer": {
    "billingAddress": {
      "address1": "535 Mission Street",
      "address2": "11th Floor",
      "city": "San Francisco",
      "countryCode": "US",
      "postalCode": "94526",
      "provinceCode": "CA"
    },
    "shippingAddress": {
      "address1": "535 Mission Street",
      "address2": "11th Floor",
      "city": "San Francisco",
      "countryCode": "US",
      "postalCode": "94526",
      "provinceCode": "CA"
    }
  }
}

Response

Successful contract update. Note - This is an example response for an extended warranty contract.

accountIdstring required

Account ID for the merchant in Extend’s system.

adminContractIdstring

Unique identifier for the Extend contract that is generated in PCRS. NOTE - This is only applicable for the PCRS contract type.

adminSyncErrorstring

Error message from PCRS when an Extend contract cannot be successfully synced.

adminSyncStatus'sync_error' | 'synced' | 'unsynced' | 'resync_required' required

Status of contract syncing to PCRS system. NOTE - This is only applicable for the PCRS contract type.

merchantCustomerIdstring

Unique identifier for the customer in the merchant’s system.

cancelledAtnumber

Cancelation date of the Extend contract. NOTE - This field is formatted as a 13 digit Epoch timestamp.

createdAtnumber required

Creation date of the Extend contract. NOTE - This field is formatted as a 13 digit Epoch timestamp.

consumerProfileIdstring

Unique identifier for the consumer profile in Extend’s system.

formIdstring

This field is used for Jewelry orders where merchants need to provide additional reporting and analytics context for the order.

idstring required

Unique identifier for an Extend contract.

isProductWarrantabilityVerifiedboolean

Indicates whether our system skipped product warrantability validation when creating a contract.

isTestboolean required

Flag that tracks whether the transaction was created as a test or not. NOTE - This is defaulted to false and should be used only under special circumstances.

limitOfLiabilityAmountnumber

Limit of liability amount of the contract.

limitOfLiabilityAmountType'product_purchase_price' | 'product_list_price'

Price that the contract limit of liability is based on.

listPricenumber

Expected retail price of the Extend plan associated to the contract purchased.

orderIdstring

Unique identifier for an Extend order.

lineItemTransactionIdstring

Unique identifier for an Extend order line item's transaction, provided by the merchant.

poNumberstring

An optional merchant generated purchase order number used for reconciliation

purchaseCurrency'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLE' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'UYI' | 'UYU' | 'UYW' | 'UZS' | 'VED' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XSU' | 'XTS' | 'XUA' | 'XXX' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL' required

Currency code used when contract was purchased. NOTE - This is an ISO-4217 currency code.

purchaseDatenumber required

Purchase date of the contract. NOTE - This field is formatted as a 13 digit Epoch timestamp.

purchasePricenumber required

Purchase price of the plan purchased.

refundedAtnumber

Date the contract was refunded at. NOTE - This field is formatted as a 13 digit Epoch timestamp.

sellerIdstring required

Unique identifier for the merchant’s Extend store (i.e. the merchant’s Extend Store ID).

sellerNamestring required

Merchant’s company or store name.

status'cancelled' | 'created' | 'delivered' | 'expired' | 'fulfilled' | 'live' | 'refund_accepted' | 'refund_denied' | 'refund_paid' | 'refund_requested' | 'voided' | 'pending_termination' | 'terminated' required

Contract status.

transactionIdstring required

Unique identifier provided by the merchant of the transaction when the contract is purchased.

type'pcrs' required

Filter for including contract types. NOTE - PCRS is the contract type for extended warranty contracts.

updatedAtnumber required

Date the contract was last updated at. NOTE - This field is formatted as a 13 digit Epoch timestamp.

cancellationReason'fraud_identified' | 'merchant_refund' | 'sp_claim' | 'correction_needed' | 'customer_requested' | 'merchant_requested' | 'created_in_error' | 'goodwill_escalation'

Why the contract was cancelled.

refundMethod'extend_ach' | 'merchant_issued' | 'no_refund_issued'

The method by which a contract was refunded to the customer.

Example response

{
  "accountId": "f36feabf-d024-431f-9506-32bfcada1231",
  "adminContractId": "1001609401",
  "adminSyncError": "Update Error: PcmiError: Contract plan expected price is not set, try re-syncing",
  "adminSyncStatus": "synced",
  "merchantCustomerId": "c57ed096-24ef-49a4-a20a-d1b8bf770980",
  "cancelledAt": 1651787627000,
  "createdAt": 1651787624000,
  "consumerProfileId": "f36feabf-d024-431f-9506-32bfcada1231",
  "coverage": {
    "starts": 1651787621000,
    "ends": 1683323621000
  },
  "customer": {
    "billingAddress": {
      "address1": "535 Mission Street",
      "address2": "11th Floor",
      "city": "San Francisco",
      "countryCode": "US",
      "postalCode": "94526",
      "provinceCode": "CA"
    },
    "email": "bobross@gmail.com",
    "name": "Bob Ross",
    "phone": "123-456-7890",
    "shippingAddress": {
      "address1": "535 Mission Street",
      "address2": "11th Floor",
      "city": "San Francisco",
      "countryCode": "US",
      "postalCode": "94526",
      "provinceCode": "CA"
    },
    "type": "consumer",
    "locale": "en-US",
    "region": "US",
    "subdivision": "CA"
  },
  "formId": "1ADJ",
  "id": "cc957cb3-3d5d-430b-90a2-9ec96ee4c3cf",
  "isProductWarrantabilityVerified": true,
  "limitOfLiabilityAmount": 1999,
  "limitOfLiabilityAmountType": "product_purchase_price",
  "listPrice": 1999,
  "orderId": "9778f161-9530-491a-bfdc-5c45214c0a6c",
  "lineItemTransactionId": "line-item-txn-12345",
  "plan": {
    "id": "10001-misc-elec-adh-replace-1y",
    "skuId": "EXT123",
    "termsId": "154ebea0-6c1b-46a4-b166-032246330526",
    "termsVersion": "1",
    "version": 1
  },
  "poNumber": "ABC-123",
  "product": {
    "fulfillmentDate": 1651787629000,
    "listPrice": 3999,
    "manufacturerWarrantyLengthLabor": 6,
    "manufacturerWarrantyLengthParts": 6,
    "purchaseDate": 1651787629000,
    "purchasePrice": 3999,
    "referenceId": "SKU-123-456",
    "reimbursementAmount": 3999,
    "serialNumber": "ABCD123456",
    "name": "Wireless Headphones",
    "transactionId": "6789876212"
  },
  "purchaseCurrency": "USD",
  "purchaseDate": 1651787620000,
  "purchasePrice": 1999,
  "refundedAt": 1651787679000,
  "resellerMerchant": {
    "id": "154ebea0-6c1b-46a4-b166-032246330526",
    "name": "Acme Reseller Company",
    "domain": "https://acme.reseller.com"
  },
  "saleOrigin": {
    "agentId": "sales agent",
    "channel": "web",
    "locationId": "Store #123",
    "platform": "BigCommerce",
    "storeAddress": {
      "address1": "535 Mission Street",
      "address2": "11th Floor",
      "city": "San Francisco",
      "countryCode": "US",
      "postalCode": "94526",
      "province": "CA"
    }
  },
  "sellerId": "598b11f3-5514-42f8-bdd5-e13ae866635a",
  "sellerName": "Quality Crafts",
  "status": "live",
  "transactionId": "123928374327464",
  "type": "pcrs",
  "updatedAt": 1651787679000,
  "charitableDonation": {
    "id": "598b11f3-5514-42f8-bdd5-e13ae866635a"
  }
}