1. Autoschedules
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
  • Autoschedules
    • Get autoschedules
      GET
    • Add autoschedule(s)
      POST
    • Get autoschedule by ID
      GET
    • Update autoschedule by ID
      PATCH
    • Delete autoschedule by ID
      DELETE
    • Get autoschedules of a team
      GET
    • Replace autoschedules of a team
      PUT
    • Get autoschedules of a customer
      GET
    • Replace autoschedules of a customer
      PUT
  • Schemas
    • Customer
    • Product
    • Ext Order
    • Webhook External Order
    • Autoschedule
    • Autoschedule Input
    • Error
  1. Autoschedules

Update autoschedule by ID

PATCH
/extapi/v1.0/autoschedules/{id}
Mengubah autoschedule. Cukup isi kolom yang hendak diubah.
Bila frequency diubah, kolom yang tidak berlaku lagi dikosongkan otomatis (mis. weekly → monthly menghapus day_of_week, tetapi day_of_month wajib diisi). Bila pindah team/hari tanpa mengisi ordering, jadwal ditaruh paling akhir.
API ini membutuhkan team_token sebagai parameter dan Bearer Token sebagai authentification.

Request

Authorization
or
Path Params

Query Params

Body Params application/json

Example
{
    "customer_id": 123456,
    "team_id": 24728,
    "frequency": "every_3_weeks",
    "day_of_week": "wed",
    "week_offset": 0
}

Request Code 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/autoschedules/?team_token=eyJkYl9pZCI6Mjk4MSwidGVhbV9pZCI6MjQ3Mjh9.LpZ9LEpy123lwzYjzypStjdk123' \
--header 'Content-Type: application/json' \
--data '{
    "customer_id": 123456,
    "team_id": 24728,
    "frequency": "every_3_weeks",
    "day_of_week": "wed",
    "week_offset": 0
}'

Responses

🟢200
application/json
Bodyapplication/json

Example
{
    "result": {
        "id": 0,
        "customer": {
            "id": 0,
            "name": "string",
            "ext_cust_no": "string"
        },
        "team": {
            "id": 0,
            "name": "string"
        },
        "frequency": "weekly",
        "day_of_week": "mon",
        "day_of_month": 1,
        "week_offset": 0,
        "ordering": 0,
        "summary": "Wednesday every 3 weeks, week_offset 1",
        "next_dates": [
            "2026-11-18",
            "2026-12-09",
            "2026-12-30"
        ]
    },
    "status": "SUCCESS",
    "status_code": 1
}
🟠400
🟠401
🟠403
🟠404
🟠409
Modified at 2026-11-03 04:12:15
Previous
Get autoschedule by ID
Next
Delete autoschedule by ID
Built with