GET /V1/inventory/sources/{sourceCode}

Get Source data by given code. If you want to create plugin on get method, also you need to create separate plugin on getList method, because entity loading way is different for these methods

Path parameters

  • sourceCode string Required

Responses

  • 200 Success.

    Hide response attributes Show response attributes object
    • source_code string

      Source code

    • name string

      Source name

    • email string

      Source email

    • contact_name string

      Source contact name

    • enabled boolean

      If source is enabled. For new entity can be null

    • description string

      Source description

    • latitude number

      Source latitude

    • longitude number

      Source longitude

    • country_id string

      Source country id

    • region_id integer

      Region id if source has registered region.

    • region string

      Region title if source has custom region

    • city string

      Source city

    • street string

      Source street name

    • postcode string

      Source post code

    • phone string

      Source phone number

    • fax string

      Source fax

    • use_default_carrier_config boolean

      Is need to use default config

    • extension_attributes object

      ExtensionInterface class for @see \Magento\InventoryApi\Api\Data\SourceInterface

      Hide extension_attributes attributes Show extension_attributes attributes object
      • is_pickup_location_active boolean
      • frontend_name string
      • frontend_description string
    Hide response attributes Show response attributes object
    • source_code string

      Source code

    • name string

      Source name

    • email string

      Source email

    • contact_name string

      Source contact name

    • enabled boolean

      If source is enabled. For new entity can be null

    • description string

      Source description

    • latitude number

      Source latitude

    • longitude number

      Source longitude

    • country_id string

      Source country id

    • region_id integer

      Region id if source has registered region.

    • region string

      Region title if source has custom region

    • city string

      Source city

    • street string

      Source street name

    • postcode string

      Source post code

    • phone string

      Source phone number

    • fax string

      Source fax

    • use_default_carrier_config boolean

      Is need to use default config

    • extension_attributes object

      ExtensionInterface class for @see \Magento\InventoryApi\Api\Data\SourceInterface

      Hide extension_attributes attributes Show extension_attributes attributes object
      • is_pickup_location_active boolean
      • frontend_name string
      • frontend_description string
  • 401 Unauthorized

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Errors list

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters list

        Hide parameters attributes Show parameters attributes object

        Error parameters item

        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters list

      Hide parameters attributes Show parameters attributes object

      Error parameters item

      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Errors list

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters list

        Hide parameters attributes Show parameters attributes object

        Error parameters item

        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters list

      Hide parameters attributes Show parameters attributes object

      Error parameters item

      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

  • 400 Bad Request

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Errors list

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters list

        Hide parameters attributes Show parameters attributes object

        Error parameters item

        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters list

      Hide parameters attributes Show parameters attributes object

      Error parameters item

      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Errors list

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters list

        Hide parameters attributes Show parameters attributes object

        Error parameters item

        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters list

      Hide parameters attributes Show parameters attributes object

      Error parameters item

      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

  • Unexpected error

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Errors list

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters list

        Hide parameters attributes Show parameters attributes object

        Error parameters item

        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters list

      Hide parameters attributes Show parameters attributes object

      Error parameters item

      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Errors list

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters list

        Hide parameters attributes Show parameters attributes object

        Error parameters item

        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters list

      Hide parameters attributes Show parameters attributes object

      Error parameters item

      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

GET /V1/inventory/sources/{sourceCode}
curl \
 --request GET 'https://magento2.winkelstraat.mac/rest/all/V1/inventory/sources/{sourceCode}'
Response examples (200)
{
  "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 (200)
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <source-code>string</source-code>
  <name>string</name>
  <email>string</email>
  <contact-name>string</contact-name>
  <enabled type="boolean">true</enabled>
  <description>string</description>
  <latitude type="float">42.0</latitude>
  <longitude type="float">42.0</longitude>
  <country-id>string</country-id>
  <region-id type="integer">42</region-id>
  <region>string</region>
  <city>string</city>
  <street>string</street>
  <postcode>string</postcode>
  <phone>string</phone>
  <fax>string</fax>
  <use-default-carrier-config type="boolean">true</use-default-carrier-config>
  <carrier-links type="array">
    <carrier-link>
      <carrier-code>string</carrier-code>
      <position type="integer">42</position>
      <extension-attributes>
      </extension-attributes>
    </carrier-link>
  </carrier-links>
  <extension-attributes>
    <is-pickup-location-active type="boolean">true</is-pickup-location-active>
    <frontend-name>string</frontend-name>
    <frontend-description>string</frontend-description>
  </extension-attributes>
</root>
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 (401)
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <message>string</message>
  <errors type="array">
    <error>
      <message>string</message>
      <parameters type="array">
        <parameter>
          <resources>string</resources>
          <fieldName>string</fieldName>
          <fieldValue>string</fieldValue>
        </parameter>
      </parameters>
    </error>
  </errors>
  <code type="integer">42</code>
  <parameters type="array">
    <parameter>
      <resources>string</resources>
      <fieldName>string</fieldName>
      <fieldValue>string</fieldValue>
    </parameter>
  </parameters>
  <trace>string</trace>
</root>
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 (400)
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <message>string</message>
  <errors type="array">
    <error>
      <message>string</message>
      <parameters type="array">
        <parameter>
          <resources>string</resources>
          <fieldName>string</fieldName>
          <fieldValue>string</fieldValue>
        </parameter>
      </parameters>
    </error>
  </errors>
  <code type="integer">42</code>
  <parameters type="array">
    <parameter>
      <resources>string</resources>
      <fieldName>string</fieldName>
      <fieldValue>string</fieldValue>
    </parameter>
  </parameters>
  <trace>string</trace>
</root>
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"
}
Response examples (default)
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <message>string</message>
  <errors type="array">
    <error>
      <message>string</message>
      <parameters type="array">
        <parameter>
          <resources>string</resources>
          <fieldName>string</fieldName>
          <fieldValue>string</fieldValue>
        </parameter>
      </parameters>
    </error>
  </errors>
  <code type="integer">42</code>
  <parameters type="array">
    <parameter>
      <resources>string</resources>
      <fieldName>string</fieldName>
      <fieldValue>string</fieldValue>
    </parameter>
  </parameters>
  <trace>string</trace>
</root>