Save Source data

PUT /V1/inventory/sources/{sourceCode}

Save Source data

Body

Responses

  • 401 Unauthorized

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Hide errors attributes Show errors attributes object
    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Hide parameters attributes Show parameters attributes object
    • trace string

      Stack trace

  • 400 Bad Request

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Hide errors attributes Show errors attributes object
    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Hide parameters attributes Show parameters attributes object
    • trace string

      Stack trace

  • Unexpected error

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Hide errors attributes Show errors attributes object
    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Hide parameters attributes Show parameters attributes object
    • trace string

      Stack trace

PUT /V1/inventory/sources/{sourceCode}
curl \
 -X PUT https://magento2.winkelstraat.mac/rest/all/V1/inventory/sources/{sourceCode} \
 -d '{"source":{"source_code":"string","name":"string","email":"string","contact_name":"string","enabled":true,"description":"string","latitude":42.0,"longitude":42.0,"country_id":"string","region_id":42,"region":"string","city":"string","street":"string","postcode":"string","phone":"string","fax":"string","use_default_carrier_config":true,"carrier_links":[{"carrier_code":"string","position":42,"extension_attributes":{}}],"extension_attributes":{"is_pickup_location_active":true,"frontend_name":"string","frontend_description":"string"}}}'
Request examples
{
  "source": {
    "source_code": "string",
    "name": "string",
    "email": "string",
    "contact_name": "string",
    "enabled": true,
    "description": "string",
    "latitude": 42.0,
    "longitude": 42.0,
    "country_id": "string",
    "region_id": 42,
    "region": "string",
    "city": "string",
    "street": "string",
    "postcode": "string",
    "phone": "string",
    "fax": "string",
    "use_default_carrier_config": true,
    "carrier_links": [
      {
        "carrier_code": "string",
        "position": 42,
        "extension_attributes": {}
      }
    ],
    "extension_attributes": {
      "is_pickup_location_active": true,
      "frontend_name": "string",
      "frontend_description": "string"
    }
  }
}
Response examples (401)
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 42,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "string"
}
Response examples (400)
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 42,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "string"
}
Response examples (default)
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 42,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "string"
}