SalesMania
  1. Customers
SalesMania
  • Authentication & Select Database
    • Get bearer token from Basic Auth
      GET
    • Get list of databases
      GET
    • Get team token for a selected database
      GET
  • Customers
    • Get customers
      GET
    • Add new customer
      POST
    • Get customer by ID
      GET
    • Update customer by ID
      PATCH
    • Delete customer by ID
      DELETE
  • Products
    • Get products
      GET
    • Add new product
      POST
    • Get product by ID
      GET
    • Update product by ID
      PATCH
    • Delete product by ID
      DELETE
  • Visits
    • Get visits
      GET
    • Add new visit
      POST
  • Orders
    • Add new order
      POST
    • Get order by ID
      GET
    • Update order by ID
      PATCH
  • Team
    • Get teams
      GET
  1. Customers

Update customer by ID

PATCH
/extapi/v1.0/customers/{id}
Mengubah data customer dengan ID tertentu.
Kolom-kolom yang hendak dirubah diisikan dalam format JSON sebagai body request.
Cukup diisikan kolom-kolom yang hendak dirubah saja, tidak harus semuanya.
ID customer yang hendak dirubah diisikan di URL sebagai path setelah /customers. Contoh: /customers/123456
API ini membutuhkan team_token sebagai parameter dan Bearer Token sebagai authentification.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params
id
integer 
required
Query Params
team_token
string 
required
Team token from api /extapi/v1.0/team_token
Example:
eyJkYl9pZCI6Mjk4MSwidGVhbV9pZCI6MjQ3Mjh9.LpZ9LEpy123lwzYjzypStjdk123
Body Params application/json
name
string 
optional
name
address
string 
optional
city
string 
optional
phone
string 
optional
ext_cust_no
string 
optional
Your internal customer no
location
object 
optional
lat
number <float>
required
between -90 and 90
>= -90<= 90
Example:
-7.110383
lon
number <float>
required
between -180 and 180
>= -180<= 180
Example:
110.473812
status
boolean 
optional
true: enable, false: disabled
tags
array[string]
optional
tag
Example
{
    "name": "string",
    "address": "string",
    "city": "string",
    "phone": "string",
    "ext_cust_no": "string",
    "location": {
        "lat": -7.110383,
        "lon": 110.473812
    },
    "status": true,
    "tags": [
        "string"
    ]
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PATCH 'https://api.salesmania.id/extapi/v1.0/customers/?team_token=eyJkYl9pZCI6Mjk4MSwidGVhbV9pZCI6MjQ3Mjh9.LpZ9LEpy123lwzYjzypStjdk123' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "string",
    "address": "string",
    "city": "string",
    "phone": "string",
    "ext_cust_no": "string",
    "location": {
        "lat": -7.110383,
        "lon": 110.473812
    },
    "status": true,
    "tags": [
        "string"
    ]
}'

Responses

🟢200Success
application/json
Body
object {0}
Example
{}
Modified at 2025-01-30 02:26:59
Previous
Get customer by ID
Next
Delete customer by ID
Built with