> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omneo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Edit Country

> A `PUT` to the `/countries/{country}` endpoint allows your application to edit country.



## OpenAPI

````yaml put /v3/countries/{country}
openapi: 3.1.0
info:
  title: Omneo
  version: 0.0.1
servers:
  - url: https://api.{tenant}.getomneo.com/api
    variables:
      tenant:
        default: example
security: []
paths:
  /v3/countries/{country}:
    put:
      tags:
        - Country
      summary: Edit Country
      description: >-
        A `PUT` to the `/countries/{country}` endpoint allows your application
        to edit country.
      operationId: countries.update
      parameters:
        - name: country
          in: path
          required: true
          description: The country ID
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCountry'
      responses:
        '200':
          description: '`Country`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Country'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    UpdateCountry:
      type: object
      properties:
        name:
          type: string
        sort_order:
          type: integer
        currency:
          type:
            - string
            - 'null'
        states:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              type:
                type: string
              iso:
                type: string
              iso_2_country:
                type: string
              iso_2_country_state_code:
                type: string
              sort_order:
                type:
                  - integer
                  - 'null'
            required:
              - name
              - type
              - iso
              - iso_2_country
              - iso_2_country_state_code
          minItems: 1
      title: UpdateCountry
    Country:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        iso_2:
          type: string
        iso_3:
          type: string
        iso_numeric:
          type: string
        sort_order:
          type:
            - integer
            - 'null'
        states:
          type: array
          items:
            $ref: '#/components/schemas/State'
        currency:
          type:
            - string
            - 'null'
        created_at:
          type: string
        updated_at:
          type: string
        region:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            name:
              type: string
            handle:
              type: string
            is_default:
              type: string
          required:
            - id
            - name
            - handle
            - is_default
      required:
        - id
        - name
        - iso_2
        - iso_3
        - iso_numeric
        - sort_order
        - states
        - currency
        - created_at
        - updated_at
        - region
      title: Country
    State:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        type:
          type: string
        iso:
          type: string
        iso_2_country:
          type: string
        iso_2_country_state_code:
          type: string
        sort_order:
          type:
            - integer
            - 'null'
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - name
        - type
        - iso
        - iso_2_country
        - iso_2_country_state_code
        - sort_order
        - created_at
        - updated_at
      title: State
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors

````