Skip to main content
POST
/
api
/
v1
/
test-helpers
/
checkout-intents
/
{checkoutIntentId}
/
shipments
/
advance
JavaScript
import CheckoutIntents from 'checkout-intents';

const client = new CheckoutIntents({
  apiKey: process.env['CHECKOUT_INTENTS_API_KEY'], // This is the default and can be omitted
});

const response = await client.testHelpers.shipments.advance('checkoutIntentId');

console.log(response.shipment);
import os
from checkout_intents import CheckoutIntents

client = CheckoutIntents(
    api_key=os.environ.get("CHECKOUT_INTENTS_API_KEY"),  # This is the default and can be omitted
)
response = client.test_helpers.shipments.advance(
    "checkoutIntentId",
)
print(response.shipment)
package com.rye.example;

import com.rye.client.CheckoutIntentsClient;
import com.rye.client.okhttp.CheckoutIntentsOkHttpClient;
import com.rye.models.testhelpers.shipments.ShipmentAdvanceParams;
import com.rye.models.testhelpers.shipments.ShipmentAdvanceResponse;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        CheckoutIntentsClient client = CheckoutIntentsOkHttpClient.fromEnv();

        ShipmentAdvanceResponse response = client.testHelpers().shipments().advance("checkoutIntentId");
    }
}
curl https://staging.api.rye.com/api/v1/test-helpers/checkout-intents/$CHECKOUT_INTENT_ID/shipments/advance \
    -X POST \
    -H "Authorization: Bearer $CHECKOUT_INTENTS_API_KEY"
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://staging.api.rye.com/api/v1/test-helpers/checkout-intents/{checkoutIntentId}/shipments/advance",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => [
    "Authorization: <api-key>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://staging.api.rye.com/api/v1/test-helpers/checkout-intents/{checkoutIntentId}/shipments/advance"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Authorization", "<api-key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
require 'uri'
require 'net/http'

url = URI("https://staging.api.rye.com/api/v1/test-helpers/checkout-intents/{checkoutIntentId}/shipments/advance")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "shipment": {
    "updatedAt": "2023-11-07T05:31:56Z",
    "createdAt": "2023-11-07T05:31:56Z",
    "marketplaceOrderId": "<string>",
    "checkoutIntentId": "<string>",
    "id": "<string>",
    "trackingEvents": [
      {
        "location": {
          "country": "<string>",
          "province": "<string>",
          "city": "<string>"
        },
        "timestamp": {
          "local": "<string>",
          "utc": "2023-11-07T05:31:56Z"
        },
        "description": "<string>"
      }
    ],
    "shippedAt": "2023-11-07T05:31:56Z",
    "tracking": {
      "number": "<string>",
      "carrierName": "<string>",
      "deliveryDate": {
        "estimated": "2023-11-07T05:31:56Z"
      },
      "url": "<string>"
    },
    "externalId": "<string>",
    "status": "shipped"
  }
}

Authorizations

Authorization
string
header
required

Rye API key

Path Parameters

checkoutIntentId
string
required

Response

200 - application/json

The advanced simulated shipment state

shipment
Shipped · object
required

Shipments that have tracking information (shipped, delayed, or delivered states)