Allomancy

Vendors

List, read, and update a store's inworld vendors.

The vendors endpoints read and update a store's inworld vendors, the units that sell a product to residents. Vendors are owner-scoped: these endpoints see only the vendors your key's store owns, and a vendor id owned by another store returns 404. Every field shape is on the Object reference page.

List vendors

GET /v1/vendors

Returns a cursor-paginated list of the store's vendors. Scope: vendors:read.

Query parameters limit and cursor are optional; see Pagination and errors for the envelope and cursor rules.

You can also narrow the list with optional filters:

  • search (string): return only vendors whose name, or whose linked product's name, contains the term. The match is case-insensitive and partial.
  • region (string): return only vendors in a Second Life region, matched by exact region name (case-insensitive).
  • minPrice / maxPrice (integer): return only vendors whose price falls within the L$ range. Vendors that inherit their product's price (a price of -1, described under Update a vendor) are left out of price filtering.
  • type (integer): return only vendors of one VendorType.
  • minDiscount (integer): return only vendors whose own discount is at least this percentage. This reads the vendor discount, not the store-group discount.
  • active (string): tri-state. Omitted or active returns active-only vendors (the default), inactive returns inactive-only, and all returns both. Any other value returns 400.

Filters combine with AND, so sending several narrows the list to vendors matching all of them. For example, GET /v1/vendors?type=2&active=all&minDiscount=10&limit=50 returns up to 50 vendors of type 2 (Multivendor), active or not, whose discount is at least 10 percent.

curl --fail-with-body "https://integrations.allomancy.net/v1/vendors?limit=50" \
  -H "X-API-Key: allo_live_8Kd2...zQ.Hk9...4w"
import requests

response = requests.get(
    "https://integrations.allomancy.net/v1/vendors",
    headers={"X-API-Key": "allo_live_8Kd2...zQ.Hk9...4w"},
    params={"limit": 50},
)
print(response.json())
const response = await fetch(
  "https://integrations.allomancy.net/v1/vendors?limit=50",
  {
    headers: { "X-API-Key": "allo_live_8Kd2...zQ.Hk9...4w" },
  },
);
console.log(await response.json());
<?php
$ch = curl_init("https://integrations.allomancy.net/v1/vendors?limit=50");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["X-API-Key: allo_live_8Kd2...zQ.Hk9...4w"]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
{
  "data": [
    {
      "id": "5c2b9d7e-4a1f-4e83-b6d0-2f8a1c3e5b90",
      "name": "Fancy hat vendor",
      "productId": "3a1f0c9b-7d2e-4c84-9a6f-1b5e8d0c2a37",
      "productName": "Fancy hat",
      "syncName": true,
      "active": true,
      "trackable": true,
      "price": 250,
      "imageFace": 2,
      "categoryId": null,
      "gachaId": null,
      "groupOnly": false,
      "discount": 10,
      "groupDiscount": 15,
      "blockCredits": false,
      "clickAction": 2,
      "touchToAcquire": false,
      "type": 0,
      "region": "Fancy Island",
      "position": "<128.0, 64.0, 25.0>"
    }
  ],
  "pagination": {
    "nextCursor": "Tjo1YzJiOWQ3ZS00YTFmLTRlODMtYjZkMC0yZjhhMWMzZTViOTA",
    "previousCursor": null,
    "limit": 50
  }
}

Each row is a VendorResponse. A price of -1 means the vendor inherits its linked product's price. Status: 200, or 400 for a bad filter or pagination parameter.

Get a vendor

GET /v1/vendors/{id}

Returns one vendor by its UUID. Scope: vendors:read.

Path parameter: id, the vendor's UUID.

curl --fail-with-body https://integrations.allomancy.net/v1/vendors/5c2b9d7e-4a1f-4e83-b6d0-2f8a1c3e5b90 \
  -H "X-API-Key: allo_live_8Kd2...zQ.Hk9...4w"
import requests

response = requests.get(
    "https://integrations.allomancy.net/v1/vendors/5c2b9d7e-4a1f-4e83-b6d0-2f8a1c3e5b90",
    headers={"X-API-Key": "allo_live_8Kd2...zQ.Hk9...4w"},
)
print(response.json())
const response = await fetch(
  "https://integrations.allomancy.net/v1/vendors/5c2b9d7e-4a1f-4e83-b6d0-2f8a1c3e5b90",
  {
    headers: { "X-API-Key": "allo_live_8Kd2...zQ.Hk9...4w" },
  },
);
console.log(await response.json());
<?php
$ch = curl_init("https://integrations.allomancy.net/v1/vendors/5c2b9d7e-4a1f-4e83-b6d0-2f8a1c3e5b90");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["X-API-Key: allo_live_8Kd2...zQ.Hk9...4w"]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;

The response is a VendorResponse. Status: 200, or 404 if no vendor matches.

Update a vendor

PUT /v1/vendors/{id}

Replaces a vendor's fields. Scope: vendors:write. The body is an UpdateVendorRequest, and it replaces the vendor's fields: an omitted field is set to its default rather than left at its previous value.

The name you send is applied for most vendor types. The exception is syncName: with syncName on, a Default vendor takes its name from its linked product and a gacha vendor from its linked gacha, so for those two types the name you send is ignored. Send null for price, or omit it, to have the vendor inherit its linked product's price.

curl --fail-with-body https://integrations.allomancy.net/v1/vendors/5c2b9d7e-4a1f-4e83-b6d0-2f8a1c3e5b90 \
  -X PUT \
  -H "X-API-Key: allo_live_8Kd2...zQ.Hk9...4w" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Fancy hat vendor",
    "productId": "3a1f0c9b-7d2e-4c84-9a6f-1b5e8d0c2a37",
    "syncName": false,
    "active": true,
    "trackable": true,
    "price": 250,
    "imageFace": 2,
    "categoryId": null,
    "gachaId": null,
    "groupOnly": false,
    "discount": 10,
    "groupDiscount": 15,
    "blockCredits": false,
    "clickAction": 2,
    "touchToAcquire": false,
    "type": 0
  }'
import requests

response = requests.put(
    "https://integrations.allomancy.net/v1/vendors/5c2b9d7e-4a1f-4e83-b6d0-2f8a1c3e5b90",
    headers={"X-API-Key": "allo_live_8Kd2...zQ.Hk9...4w"},
    json={
        "name": "Fancy hat vendor",
        "productId": "3a1f0c9b-7d2e-4c84-9a6f-1b5e8d0c2a37",
        "syncName": False,
        "active": True,
        "trackable": True,
        "price": 250,
        "imageFace": 2,
        "categoryId": None,
        "gachaId": None,
        "groupOnly": False,
        "discount": 10,
        "groupDiscount": 15,
        "blockCredits": False,
        "clickAction": 2,
        "touchToAcquire": False,
        "type": 0,
    },
)
print(response.json())
const response = await fetch(
  "https://integrations.allomancy.net/v1/vendors/5c2b9d7e-4a1f-4e83-b6d0-2f8a1c3e5b90",
  {
    method: "PUT",
    headers: {
      "X-API-Key": "allo_live_8Kd2...zQ.Hk9...4w",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      name: "Fancy hat vendor",
      productId: "3a1f0c9b-7d2e-4c84-9a6f-1b5e8d0c2a37",
      syncName: false,
      active: true,
      trackable: true,
      price: 250,
      imageFace: 2,
      categoryId: null,
      gachaId: null,
      groupOnly: false,
      discount: 10,
      groupDiscount: 15,
      blockCredits: false,
      clickAction: 2,
      touchToAcquire: false,
      type: 0,
    }),
  },
);
console.log(await response.json());
<?php
$ch = curl_init("https://integrations.allomancy.net/v1/vendors/5c2b9d7e-4a1f-4e83-b6d0-2f8a1c3e5b90");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "X-API-Key: allo_live_8Kd2...zQ.Hk9...4w",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "name" => "Fancy hat vendor",
    "productId" => "3a1f0c9b-7d2e-4c84-9a6f-1b5e8d0c2a37",
    "syncName" => false,
    "active" => true,
    "trackable" => true,
    "price" => 250,
    "imageFace" => 2,
    "categoryId" => null,
    "gachaId" => null,
    "groupOnly" => false,
    "discount" => 10,
    "groupDiscount" => 15,
    "blockCredits" => false,
    "clickAction" => 2,
    "touchToAcquire" => false,
    "type" => 0,
]));
$response = curl_exec($ch);
curl_close($ch);
echo $response;

The response is the updated VendorResponse. Status: 200; 404 if no vendor matches; or 400 for an invalid body. A 400 also covers the field rules: discount and groupDiscount must each be 0 to 100, and groupDiscount must be at least discount; imageFace must be 0 to 7; name must be at most 63 characters; price must be -1 (inherit) or 0 or greater; type and clickAction must be recognized values; a type of MultiMenuVendor requires a categoryId and a type of GachaVendor requires a gachaId; and a productId, categoryId, or gachaId that does not belong to the store is rejected (Product not found, Category not found, Gacha not found).

On this page