Skip to content

Bad attributes formatting for Subscriptions managecontactslists #36

Open
@dfabreguette

Description

@dfabreguette

Hi,
just to let you know, there's a mistake in the managecontactslists contact_lists attributes formatting here (both in API reference and Guides) : https://dev.mailjet.com/email/guides/contact-management/#manage-the-subscription-status-of-an-existing-contact

in the examples in ruby mode :
Capture d’écran 2022-01-19 à 12 32 01

I got this error :

Mailjet::ApiError (error 400 while sending #<RestClient::Resource:0x00007fdd8dc38b20 @url="https://api.mailjet.com/v3/REST/contact/XXX/managecontactslists", @block=nil, @options={:public_operations=>[:post], :read_only=>nil, :perform_api_call=>true, :open_timeout=>nil, :read_timeout=>nil, :user=>"XXX", :password=>"XXX", :content_type=>"application/json"}> to https://api.mailjet.com/v3/REST/contact/10421273/managecontactslists with {"ContactsLists"=>[{"action"=>"addnoforce", "list_id"=>"XXX"}]})

Until I changed my formatting to :

Mailjet::Contact_managecontactslists.create(
        id: any_mailjet_contact.id,
        contacts_lists: [
          {
            "Action" => "addnoforce",
            "ListID" => "xxx"
          }
        ])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions