Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POST /v2/orders or v3/orders does not handle instance_id according to schema #53

Open
hedqvist opened this issue Oct 18, 2019 · 1 comment
Labels

Comments

@hedqvist
Copy link

@hedqvist hedqvist commented Oct 18, 2019

Describe the bug
In the documentation for the rest endpoints: POST v2/orders or POST v3/orders

The property "instance_id" is displayed as an property that could be posted.
https://ibb.co/jWTz3t5

Example on posted data if we post like documentation says:

"shipping_lines": [
    {
      "method_title": "Postage",
      "method_id": "flat_rate",
      "instance_id": "1",
      "total": "23.20",
      "total_tax": "5.80"
    }
  ],

Response from API:

    {
      "id": 60657,
      "method_title": "Postage",
      "method_id": "flat_rate",
      "instance_id": "",
      "total": "23.20",
      "total_tax": "5.80",
      "taxes": [
        {
          "id": 1,
          "total": "5.8",
          "subtotal": ""
        }
      ],
      "meta_data": [
        
      ]
    }
  ]

Instead if we post instance_id in meta_data:

"shipping_lines": [
  {
    "method_title": "Postage",
    "method_id": "flat_rate",
    "total": "23.20",
    "total_tax": "5.80",
    "meta_data": [
      {
        "key": "instance_id",
        "value": "1"
      }
    ]
  }
],

Reponse:

"shipping_lines": [
        {
            "id": 1645,
            "method_title": "Postage",
            "method_id": "flat_rate",
            "instance_id": "1",
            "total": "23.20",
            "total_tax": "5.80",
            "taxes": [
                {
                    "id": 1,
                    "total": "5.8",
                    "subtotal": ""
                }
            ],
            "meta_data": []
        }
    ],

To Reproduce

Screenshots
https://ibb.co/jWTz3t5

Expected behavior
A clear and concise description of what you expected to happen.

Isolating the problem (mark completed items with an [x]):

  • I have deactivated other plugins and confirmed this bug occurs when only WooCommerce plugin is active.
  • This bug happens with a default WordPress theme active, or Storefront.
  • I can reproduce this bug consistently using the steps above.
@hedqvist hedqvist changed the title POST /v2/orders or v3/orders does not handle instance_id POST /v2/orders or v3/orders does not handle instance_id according to schema Oct 18, 2019
@claudiosanches claudiosanches transferred this issue from woocommerce/woocommerce Oct 18, 2019
@issue-label-bot issue-label-bot bot added the type: bug label Oct 18, 2019
@issue-label-bot

This comment has been minimized.

Copy link

@issue-label-bot issue-label-bot bot commented Oct 18, 2019

Issue-Label Bot is automatically applying the label type: bug to this issue, with a confidence of 0.91. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.