---
title: "Updates Supplier by id"
url: "https://developer.retailexpress.com.au/apis/retail-express-api-21-v2/versions/d3750347-3c58-45e9-b3b1-b23a00e713ed/operations/put-suppliers-id"
---

> Full API specification: https://developer.retailexpress.com.au/apis/retail-express-api-21-v2/versions/d3750347-3c58-45e9-b3b1-b23a00e713ed.md

# Updates Supplier by id

`PUT` `/suppliers/{id}`

Operation ID: `put-suppliers-id`

Sample request: PUT /supplier { "supplier_code": "supplier code", "name": "Supplier test", "address": { "address_line1": "string", "suburb": "string", "state": "string", "postcode": "string", "country": { "id": 2 } }, "phone": "string", "fax": "string", "contact_name": "string", "contact_email": "string@com.au", "order_email": "string@com.au", "admin_only_orders": false, "deposit_required": false, "shipping_port": { "id": 2, "name": "string" }, "country_of_origin": { "id": 2, "name": "string" }, "shipping_terms": "string", "payment_terms": "string", "comments": "Supplier comments", "purchase_order_template": "Standard" }

## Path parameters

- `id` (integer, int32, required) - Format - int32. Supplier id

## Header parameters

- `x-api-key` (string, required) - Api subscription key
- `Cache-Control` (string, optional)
- `Authorization` (string, required) - Bearer token for authorization (e.g., Bearer <token>)

## Request body

Content types: `application/json`

## Responses

- `200` - Returns updated Supplier
- `400` - Bad request
- `401` - Unauthorized
- `403` - Forbidden
- `404` - Supplier not found

## OpenAPI definition

```yaml
openapi: 3.0.1
info:
  title: Retail Express API
  version: V2
servers:
  - url: https://api.retailexpress.com.au/v2
paths:
  /suppliers/{id}:
    put:
      tags:
        - suppliers
      summary: Updates Supplier by id
      description: "Sample request:\r

        \r

        \     PUT /supplier\r

        \     {\r

        \         \"supplier_code\": \"supplier code\",\r

        \         \"name\": \"Supplier test\",\r

        \         \"address\": {\r

        \             \"address_line1\": \"string\",\r

        \             \"suburb\": \"string\",\r

        \             \"state\": \"string\",\r

        \             \"postcode\": \"string\",\r

        \             \"country\": {\r

        \                 \"id\": 2        \r

        \              }\r

        \         },\r

        \         \"phone\": \"string\",\r

        \         \"fax\": \"string\",\r

        \         \"contact_name\": \"string\",\r

        \         \"contact_email\": \"string@com.au\",\r

        \         \"order_email\": \"string@com.au\",\r

        \         \"admin_only_orders\": false,\r

        \         \"deposit_required\": false,\r

        \         \"shipping_port\": {\r

        \             \"id\": 2,\r

        \             \"name\": \"string\"\r

        \         },\r

        \         \"country_of_origin\": {\r

        \             \"id\": 2,\r

        \             \"name\": \"string\"\r

        \         },\r

        \         \"shipping_terms\": \"string\",\r

        \         \"payment_terms\": \"string\",\r

        \         \"comments\": \"Supplier comments\",\r

        \         \"purchase_order_template\": \"Standard\"        \r

        \      }"
      operationId: put-suppliers-id
      parameters:
        - name: id
          in: path
          description: Format - int32. Supplier id
          required: true
          schema:
            type: integer
            description: Supplier id
            format: int32
            example: 10000
        - name: x-api-key
          in: header
          description: Api subscription key
          required: true
          schema:
            type: string
        - name: Cache-Control
          in: header
          required: false
          schema:
            type: string
            default: no-cache
        - name: Authorization
          in: header
          required: true
          description: Bearer token for authorization (e.g., Bearer <token>)
          schema:
            type: string
      requestBody:
        description: Supplier model
        content:
          application/json:
            schema:
              title: EmptyExample
              type: object
              additionalProperties: false
      responses:
        "200":
          description: Returns updated Supplier
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Supplier"
              example:
                id: 0
                supplier_code: string
                name: string
                address:
                  address_line1: string
                  suburb: string
                  state: string
                  postcode: string
                  country:
                    id: 0
                    name: string
                phone: string
                fax: string
                contact_name: string
                contact_email: string
                order_email: string
                admin_only_orders: false
                deposit_required: false
                shipping_port:
                  id: 0
                  name: string
                country_of_origin:
                  id: 0
                  name: string
                shipping_terms: string
                payment_terms: string
                comments: string
                purchase_order_template: string
                modified_on: string
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
              example:
                type: string
                title: string
                status: 0
                detail: string
                instance: string
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
              example:
                type: string
                title: string
                status: 0
                detail: string
                instance: string
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
              example:
                type: string
                title: string
                status: 0
                detail: string
                instance: string
        "404":
          description: Supplier not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
              example:
                type: string
                title: string
                status: 0
                detail: string
                instance: string
security: []
components:
  schemas:
    Supplier:
      title: ""
      type: object
      properties:
        id:
          type: integer
          description: Supplier Id
          format: int32
          nullable: true
        supplier_code:
          maxLength: 20
          minLength: 0
          type: string
          description: Supplier Code
          nullable: true
        name:
          maxLength: 50
          minLength: 0
          type: string
          description: Supplier Name
          nullable: true
        address:
          $ref: "#/components/schemas/SupplierReturnAddress"
        phone:
          maxLength: 20
          minLength: 0
          type: string
          description: Supplier Phone Number
          nullable: true
        fax:
          maxLength: 20
          minLength: 0
          type: string
          description: Supplier Fax Number
          nullable: true
        contact_name:
          maxLength: 50
          minLength: 0
          type: string
          description: Supplier Contact Name
          nullable: true
        contact_email:
          maxLength: 120
          minLength: 0
          type: string
          description: Supplier Contact Email
          format: email
          nullable: true
        order_email:
          maxLength: 120
          minLength: 0
          type: string
          description: Supplier Order Email
          format: email
          nullable: true
        admin_only_orders:
          type: boolean
          description: Admin Only Orders Flag
          default: false
        deposit_required:
          type: boolean
          description: Deposit Required Flag
          default: false
        shipping_port:
          $ref: "#/components/schemas/SupplierShippingPort"
        country_of_origin:
          $ref: "#/components/schemas/SupplierAddressCountry"
        shipping_terms:
          maxLength: 50
          minLength: 0
          type: string
          description: Supplier Shipping Terms
          nullable: true
        payment_terms:
          maxLength: 50
          minLength: 0
          type: string
          description: Supplier Payment Terms
          nullable: true
        comments:
          maxLength: 255
          minLength: 0
          pattern: ^[^*|":<>[\]{}`\()';@&$#!-/?]+$
          type: string
          description: Supplier Comments
          nullable: true
        purchase_order_template:
          type: string
          description: Supplier Purchase Order Template type
          nullable: true
        modified_on:
          type: string
          description: Modified On
          format: date-time
      additionalProperties: false
      description: Supplier model
    ProblemDetails:
      title: ""
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    SupplierReturnAddress:
      title: ""
      type: object
      properties:
        address_line1:
          maxLength: 255
          minLength: 0
          type: string
          description: Address line 1
          nullable: true
        suburb:
          maxLength: 50
          minLength: 0
          type: string
          description: Suburb
          nullable: true
        state:
          maxLength: 50
          minLength: 0
          type: string
          description: State
          nullable: true
        postcode:
          maxLength: 10
          minLength: 0
          type: string
          description: Post code
          nullable: true
        country:
          $ref: "#/components/schemas/SupplierAddressCountry"
      additionalProperties: false
      description: Supplier address model
    SupplierShippingPort:
      title: ""
      type: object
      properties:
        id:
          type: integer
          description: Supplier shipping port id
          format: int32
        name:
          maxLength: 100
          minLength: 0
          type: string
          description: Supplier shipping port name
          nullable: true
      additionalProperties: false
    SupplierAddressCountry:
      title: ""
      type: object
      properties:
        id:
          type: integer
          description: Supplier country id
          format: int32
          nullable: true
        name:
          type: string
          description: Supplier country name
          nullable: true
      additionalProperties: false
```
