Skip to main content
PATCH
/
v1
/
onye
/
{uid}
curl -X PATCH https://api.kwugwo.africa/v1/onye/ony.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE \
  -H "Authorization: Bearer $KWUGWO_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "first_name": "Adaeze", "meta": { "source": "shopify", "tier": "vip" } }'
const onye = await fetch(
  `https://api.kwugwo.africa/v1/onye/${onyeUid}`,
  {
    method: "PATCH",
    headers: {
      Authorization: `Bearer ${process.env.KWUGWO_SECRET_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      first_name: "Adaeze",
      meta: { source: "shopify", tier: "vip" },
    }),
  }
).then(r => r.json());
<?php
$ch = curl_init("https://api.kwugwo.africa/v1/onye/{$onyeUid}");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST  => 'PATCH',
    CURLOPT_HTTPHEADER     => [
        'Authorization: Bearer ' . getenv('KWUGWO_SECRET_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'first_name' => 'Adaeze',
        'meta'       => ['source' => 'shopify', 'tier' => 'vip'],
    ]),
]);
$onye = json_decode(curl_exec($ch), true);
curl_close($ch);
import os, requests

onye = requests.patch(
    f"https://api.kwugwo.africa/v1/onye/{onye_uid}",
    headers={"Authorization": f"Bearer {os.environ['KWUGWO_SECRET_KEY']}"},
    json={"first_name": "Adaeze", "meta": {"source": "shopify", "tier": "vip"}},
).json()
body, _ := json.Marshal(map[string]any{
    "first_name": "Adaeze",
    "meta":       map[string]string{"source": "shopify", "tier": "vip"},
})
url := fmt.Sprintf("https://api.kwugwo.africa/v1/onye/%s", onyeUid)
req, _ := http.NewRequest("PATCH", url, bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer "+os.Getenv("KWUGWO_SECRET_KEY"))
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
{
  "uid": "ony.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE",
  "email": "ada@example.com",
  "first_name": "Adaeze",
  "last_name": "Okeke",
  "meta": { "source": "shopify", "tier": "vip" }
}
Partially updates the customer. Send only the fields you want to change; omitted fields keep their existing values.

Path parameters

uid
string
required
Customer ID, ony.XXXX.YYYY....

Body parameters

All fields are optional. When sent, the same validation rules as Create apply.
email
string
New email. Must be valid.
ref
string
Your reference (max 150 chars).
first_name
string
Up to 100 chars.
last_name
string
Up to 100 chars.
billing_address
object
Same shape as on create.
meta
object
Replaces the existing meta; it is not merged.

Response

Returns the updated customer, same shape as Get a customer.
curl -X PATCH https://api.kwugwo.africa/v1/onye/ony.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE \
  -H "Authorization: Bearer $KWUGWO_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "first_name": "Adaeze", "meta": { "source": "shopify", "tier": "vip" } }'
const onye = await fetch(
  `https://api.kwugwo.africa/v1/onye/${onyeUid}`,
  {
    method: "PATCH",
    headers: {
      Authorization: `Bearer ${process.env.KWUGWO_SECRET_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      first_name: "Adaeze",
      meta: { source: "shopify", tier: "vip" },
    }),
  }
).then(r => r.json());
<?php
$ch = curl_init("https://api.kwugwo.africa/v1/onye/{$onyeUid}");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST  => 'PATCH',
    CURLOPT_HTTPHEADER     => [
        'Authorization: Bearer ' . getenv('KWUGWO_SECRET_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'first_name' => 'Adaeze',
        'meta'       => ['source' => 'shopify', 'tier' => 'vip'],
    ]),
]);
$onye = json_decode(curl_exec($ch), true);
curl_close($ch);
import os, requests

onye = requests.patch(
    f"https://api.kwugwo.africa/v1/onye/{onye_uid}",
    headers={"Authorization": f"Bearer {os.environ['KWUGWO_SECRET_KEY']}"},
    json={"first_name": "Adaeze", "meta": {"source": "shopify", "tier": "vip"}},
).json()
body, _ := json.Marshal(map[string]any{
    "first_name": "Adaeze",
    "meta":       map[string]string{"source": "shopify", "tier": "vip"},
})
url := fmt.Sprintf("https://api.kwugwo.africa/v1/onye/%s", onyeUid)
req, _ := http.NewRequest("PATCH", url, bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer "+os.Getenv("KWUGWO_SECRET_KEY"))
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
{
  "uid": "ony.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE",
  "email": "ada@example.com",
  "first_name": "Adaeze",
  "last_name": "Okeke",
  "meta": { "source": "shopify", "tier": "vip" }
}