Sync API (0.1.0)

Download OpenAPI specification:Download

Authorization

Token

This API uses JWT for authorization. SPARETECH will provide your client credentials, that are specific to each organisation and integration environment. See the Authentication section of this documentation for details on how to obtain a token.

Security Scheme Type: HTTP
HTTP Authorization Scheme: bearer
Bearer format: JWT

Authentication

Retrieve an access token

Retrieves a JWT bearer token to authorize requests. The token has an expiration time and can be requested a limited number of times per day.

Request Body schema: application/x-www-form-urlencoded

Client ID and Client Secret pair.

client_id
required
string
client_secret
required
string

Responses

Response samples

Content type
application/json
{
  • "access_token": "eyJz93a...k4laUWw",
  • "expires_in": 86400,
  • "token_type": "Bearer"
}

Retrieve an access token Deprecated

Retrieves a JWT bearer token to authorize requests. The token has an expiration time and can be requested a limited number of times per day.

Request Body schema: application/json

Client ID and Client Secret pair.

clientId
required
string
clientSecret
required
string

Responses

Request samples

Content type
application/json
{
  • "clientId": "YOUR_CLIENT_ID",
  • "clientSecret": "YOUR_CLIENT_SECRET"
}

Response samples

Content type
application/json
{
  • "accessToken": "eyJz93a...k4laUWw",
  • "expiresIn": 86400,
  • "tokenType": "Bearer"
}

Material Master Sync

Upsert material

This endpoint is part of the module “Material Master Sync” for updating the material master content in SPARETECH based on the changes initiated from the external ERP. The current endpoint updates Material and plants data if material already exists or create a new material if it is a new material.

Authorizations:
Token
Request Body schema: application/json
required
object (MARA)

Master material general data

object (UPSLINK)

Reference from Object to Superior UPS

Responses

Request samples

Content type
application/json
{
  • "MARA": {
    },
  • "UPSLINK": {
    }
}

CreationIntent

Confirm material creation

Confirms the material creation by supplying the material number.

Authorizations:
Token
path Parameters
id
required
string
Request Body schema: application/json
materialNumber
required
string

Responses

Request samples

Content type
application/json
{
  • "materialNumber": "string"
}

Reject material creation

Marks the intent as rejected by the external system.

Authorizations:
Token
path Parameters
id
required
string
Request Body schema: application/json
message
required
string

Short description of the reason for rejecting the intent.

Responses

Request samples

Content type
application/json
{
  • "message": "string"
}

ChangeIntent

Confirm material change

Confirms the change to the material.

Authorizations:
Token
path Parameters
id
required
string

Responses

Reject material change

Marks the intent as rejected by the external system.

Authorizations:
Token
path Parameters
id
required
string
Request Body schema: application/json
message
required
string

Short description of the reason for rejecting the intent.

Responses

Request samples

Content type
application/json
{
  • "message": "string"
}

ExtensionIntent

Confirm material extension

Confirms the extension of the material to a new plant.

Authorizations:
Token
path Parameters
id
required
string

Responses

Reject material extension

Marks the intent as rejected by the external system.

Authorizations:
Token
path Parameters
id
required
string
Request Body schema: application/json
message
required
string

Short description of the reason for rejecting the intent.

Responses

Request samples

Content type
application/json
{
  • "message": "string"
}