Passer au contenu

Limited
Replace specification contacts

Requête

Full replace of YOUR company's contacts on the specification (works on published specifications): the retailer's contacts when you are the retailer, the supplier's when you are the supplier. Contacts are plain user references addressed by userId; users are discoverable through the CUMD public API. Each contact carries its signatory flag (isSignatory), as in the UI; signature history is not writable.

Only your company's direct contacts are replaced. Left untouched: the other party's contacts, contacts that come from a collaboration (supplier invitations, pending or accepted), and translator contacts. The specification owner stays a contact whether or not it is sent.

The response lists exactly that scope, so sending it back unchanged is a no-op (200, nothing written). The full contact list of both parties is on the specification read.

Sécurité
oauth2(Portées requises: t1_api)
Chemin
specificationIdstring, (uuid)obligatoire

The unique identifier of the specification

Corpsapplication/jsonobligatoire
contactsArray of objectsobligatoire
curl -i -X PUT \
  'https://apis.traceone.com/spec/v2/food/specifications/{specificationId}/contacts' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "contacts": [
      {
        "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
        "isSignatory": true
      }
    ]
  }'

Réponses

Your company's direct contacts on the specification, as stored

Corpsapplication/json
contactsArray of objectsobligatoire
Réponse
{ "contacts": [ { … } ] }