AlmondTill/G3N API

Set up a supplier and what you buy from them

Record who sells to you, your commercial terms with them, their catalog entry for each of your variants — their cost, their pack, their SKU — and the pack sizes they ship in.

Procurement · a play in 4 steps.

In the office

Where it starts: the office’s Suppliers page.

Step 1. Record the supplier. Open Suppliers.

Step 2. Record your commercial relationship — terms, currency, minimums. Open Supplier accounts.

Step 3. Record what they sell you — their cost, their pack, their SKU for your variant. Open Supplier items.

Step 4. Record the case or pack size they ship in. Open Purchase packs.

For developers — the calls

The steps

  1. Record the supplier. — createVendor
  2. Record your commercial relationship — terms, currency, minimums. — createOrgVendor
  3. Record what they sell you — their cost, their pack, their SKU for your variant. — createOrgVendorItem
  4. Record the case or pack size they ship in. — createPurchasePack

The calls

Every operation this use case runs, in the order it first appears, with the request and the response its reference page shows.

createVendor

createVendor — mutation · Create a new vendor — who sells to you at your organization.

Example request

graphql
mutation ExampleCreateVendor($input: NewVendorInput!) {
  createVendor(input: $input) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    code
  }
}

Variables:

json
{
  "input": {
    "caption": "Blue jeans"
  }
}

Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.

Example response

json
{
  "data": {
    "createVendor": {
      "id": "01900000-0000-7000-8000-ddc43e730000",
      "sysId": "VN-EXMP-0000-000F",
      "type": "Vendor",
      "caption": "Blue jeans",
      "status": "active",
      "parentId": "01900000-0000-7000-8000-eacdfcfd0000",
      "rootId": "01900000-0000-7000-8000-a1295a650000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 0,
      "revision": "01900000-0000-7000-8000-53c6eea90000",
      "code": "BJ-001"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

createOrgVendor

createOrgVendor — mutation · Create a new your commercial relationship with a vendor — terms, currency, minimums at your organization.

Example request

graphql
mutation ExampleCreateOrgVendor($input: NewOrgVendorInput!) {
  createOrgVendor(input: $input) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    vendorId
    accountNumber
    terms
    purchasingCurrency
    paymentTerms
    incotermCode
    leadTimeDays
    defaultShipToLogicalFacilityId
    billToContactId
    returnsToContactId
    requireCatalogItem
    code
  }
}

Variables:

json
{
  "input": {
    "caption": "Blue jeans",
    "organizationId": "01900000-0000-7000-8000-1971e30a0000",
    "vendorId": "01900000-0000-7000-8000-ddc43e730000"
  }
}

Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.

Example response

json
{
  "data": {
    "createOrgVendor": {
      "id": "01900000-0000-7000-8000-67df2a7f0000",
      "sysId": "EV-EXMP-0000-000F",
      "type": "OrgVendor",
      "caption": "Blue jeans",
      "status": "active",
      "parentId": "01900000-0000-7000-8000-eacdfcfd0000",
      "rootId": "01900000-0000-7000-8000-a1295a650000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 0,
      "revision": "01900000-0000-7000-8000-53c6eea90000",
      "vendorId": "01900000-0000-7000-8000-ddc43e730000",
      "accountNumber": "<account number>",
      "terms": "<terms>",
      "purchasingCurrency": "<purchasing currency>",
      "paymentTerms": "<payment terms>",
      "incotermCode": "BJ-001",
      "leadTimeDays": 1,
      "defaultShipToLogicalFacilityId": "01900000-0000-7000-8000-644043210000",
      "billToContactId": "01900000-0000-7000-8000-5a1394130000",
      "returnsToContactId": "01900000-0000-7000-8000-819db19b0000",
      "requireCatalogItem": true,
      "code": "BJ-001"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

createOrgVendorItem

createOrgVendorItem — mutation · Create a new vendor’s catalog entry for one of your variants — their cost, their pack, their SKU at your organization.

Example request

graphql
mutation ExampleCreateOrgVendorItem($input: NewOrgVendorItemInput!) {
  createOrgVendorItem(input: $input) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    variantId
    vendorPartNumber
    moq
    leadTimeDays
    purchasePackId
  }
}

Variables:

json
{
  "input": {
    "caption": "Blue jeans",
    "orgVendorId": "01900000-0000-7000-8000-67df2a7f0000",
    "variantId": "01900000-0000-7000-8000-8433b0260000"
  }
}

Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.

Example response

json
{
  "data": {
    "createOrgVendorItem": {
      "id": "01900000-0000-7000-8000-13c2da180000",
      "sysId": "EI-EXMP-0000-000F",
      "type": "OrgVendorItem",
      "caption": "Blue jeans",
      "status": "active",
      "parentId": "01900000-0000-7000-8000-67df2a7f0000",
      "rootId": "01900000-0000-7000-8000-a1295a650000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 0,
      "revision": "01900000-0000-7000-8000-53c6eea90000",
      "variantId": "01900000-0000-7000-8000-8433b0260000",
      "vendorPartNumber": "<vendor part number>",
      "moq": 1,
      "leadTimeDays": 1,
      "purchasePackId": "01900000-0000-7000-8000-f00805cb0000"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

createPurchasePack

createPurchasePack — mutation · Create a new purchase pack — the case/pack size a vendor sells in at your organization.

Example request

graphql
mutation ExampleCreatePurchasePack($input: NewPurchasePackInput!) {
  createPurchasePack(input: $input) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    code
    unitsPerPack
    packGtin
    nominalWeightKg
    lengthCm
    widthCm
    heightCm
  }
}

Variables:

json
{
  "input": {
    "caption": "Blue jeans",
    "variantId": "01900000-0000-7000-8000-8433b0260000",
    "code": "BJ-001",
    "unitsPerPack": "<units per pack>"
  }
}

Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.

Example response

json
{
  "data": {
    "createPurchasePack": {
      "id": "01900000-0000-7000-8000-f00805cb0000",
      "sysId": "PK-EXMP-0000-000F",
      "type": "PurchasePack",
      "caption": "Blue jeans",
      "status": "active",
      "parentId": "01900000-0000-7000-8000-8433b0260000",
      "rootId": "01900000-0000-7000-8000-a1295a650000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 0,
      "revision": "01900000-0000-7000-8000-53c6eea90000",
      "code": "BJ-001",
      "unitsPerPack": "<units per pack>",
      "packGtin": "<pack gtin>",
      "nominalWeightKg": "<nominal weight kg>",
      "lengthCm": "<length cm>",
      "widthCm": "<width cm>",
      "heightCm": "<height cm>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}